5
votes

I am building an application with Laravel that receives notifications and then fires events to handle those notifications. I want these events to be Queued so that only one event is handled at a time.

I've been trying to use the "database" Queue driver that the documentation says is available. I've changed the default driver in config/queue.php so it is set to use "database" and I ran php artisan queue:table to create the jobs migration but when I send a notification to the app I do not see any sign of queues being used in the jobs table or anywhere else. What could be going wrong?

(My EventHandler class is using ShouldBeQueued as well)

1
Are you running php artisan queue:listen before firing the queued event? Check out the answer I gave to your other question.haakym
Yes, it turned out Laravel wasn't grabbing the database QUEUE_DRIVER from my .env file for some reason. Thanks!erichie

1 Answers

6
votes

In your .env file, you have to add this.

QUEUE_DRIVER=database