Last active
June 6, 2020 14:49
-
-
Save ridwanbejo/485a7017b7b6072ebd9bc0761d26cb37 to your computer and use it in GitHub Desktop.
laravel-queue-sqs - HelloWorldJob.php v1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Jobs; | |
class HelloWorldJob extends Job | |
{ | |
protected $message; | |
/** | |
* Create a new job instance. | |
* | |
* @return void | |
*/ | |
public function __construct($message) | |
{ | |
$this->message = $message; | |
} | |
/** | |
* Execute the job. | |
* | |
* @return void | |
*/ | |
public function handle() | |
{ | |
echo "Running an hello world job ...\n"; | |
echo "Queue Broker: AWS SQS\n"; | |
echo "Processing message: ".$this->message."\n"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment