Skip to content

devcupboard/elegant-background-job-php-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elegant-background-job-php-demo

Demo code for Elegant background jobs in PHP.

To run queue worker

(forever running program)

php bin/queue-worker.php

To invoke sending message

Open another terminal(or tab) and run:

php bin/send-forgot-password-email.php

After that, if you see the output of queue worker, you should see something like this:

Processing: App\Job\SendForgotPasswordEmail
Processed: App\Job\SendForgotPasswordEmail

That's all. The more messages you add to queue, the more processing will be done by the queue worker.