5

I have a problem with laravel jobs. I configured laravel jobs to work with the database and it is working.

When I execute a job, the entry is created in database and the constructor is well executed.

However, the handle function is never executed ... and the jobs stay in the jobs table.

Someone already had this problem?

(I use Laravel 5.7).

Udhav Sarvaiya
  • 9,380
  • 13
  • 53
  • 64
tom1337
  • 228
  • 3
  • 11

2 Answers2

3

I found the problem...

I'm using a different queue name that the default and in config/queue.php, in the database array you have the default queue name set to "default".

So when i execute : php artisan queue:work , he is waiting for default queue.

When i execute the command line : php artisan queue:work --queue QUEUENAME it is working !

Thanks everybody.

tom1337
  • 228
  • 3
  • 11
0

You should listen to the queue for default

php artisan queue:work

or

php artisan queue:work --sleep=1 --tries=5 --timeout=60

If you are not using the default queue then mention the custom queue

php artisan queue:work --sleep=1 --tries=5 --timeout=60 --queue customQueue
β.εηοιτ.βε
  • 33,893
  • 13
  • 69
  • 83