Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel not performing job queue with database

I am trying to perform a job queue to execute mail and sms functioning in background process. And it is working with

QUEUE_DRIVER=sync

in .env file But when i use it with database

QUEUE_DRIVER=database

its not working even after using cli command:

php artisan queue:listen

Please tell me what is the problem with such functionality

laravel.log:enter image description here

like image 363
Manish Arora Avatar asked Nov 09 '22 10:11

Manish Arora


1 Answers

here is how i would debug it:

  • stop supervisor if you are using it.
  • cd into your directory and type php artisan queue:listen if you see any errors then likely you have some issues with the job class that you are running laravel 5.2 give you the path in the error and if you look closely you can see in the database the parameters that were passed to the constructor.

also check to see if the reserved field in the jobs table is filled, and the attempts are more than 1.

if the attempts are 0 that means you have a problem with your supervisor service (if you are using it) try unlink /path/to/socket.sock and then run the supervisord command.

like image 97
Sari Yono Avatar answered Nov 14 '22 22:11

Sari Yono