AbdallahSabri's avatar

Strange problem in queue worker

Hi there,

I am developing my application on windows 7, the case is I upload an excel file, store file location on database, start a queue job after 5 seconds, to analyse the excel file.

If I don't run the command php artisan queue:work the file will not analyse and the job still in the database.

Until here everything is OK.

I uploaded the project in Ubuntu server, I test the upload process, the file analysis start immediately, even before I start a queue worker.

What should I do to start the file analysis ONLY when I start a queue worker?

0 likes
3 replies
bobbybouwmann's avatar
Level 88

I think this has something to do with your setup of the queue. You need to specify which QUEUE_DRIVER you want to use. By default this is set to sync in your .env

Make sure that your .env holds the correct value. If changing your .env make sure that sure that your config isn't cached anymore. You can do that by running php artisan cache:clear.

Let me know if that helps you :D

1 like

Please or to participate in this conversation.