Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clear Laravel Queue Cache without restarting

Tags:

php

laravel

web

In my application, every customer has a kind of complex class in which we do some search and replaces for that specific customer. I run Queue workers to run a daily sync with eBay for every single customer to do some kind of search and replaces.

The problem is Laravel queues caches the code for a good deal of time and if I want to go and change any customer class file (Which happens frequently), I will have to restart queue workers (Which may stop a running job that I don't intend to stop).

So my question is, how to force Laravel Queue to reread the new code without restarting workers?

like image 807
Assem Avatar asked Nov 22 '17 12:11

Assem


1 Answers

you will have not cache if you use code:

php artisan queue:listen

Also, interest command:

php artisan queue:work --queue=system,hot,default --tries=10 --timeout=10  --stop-when-empty
like image 64
Антон Баранов Avatar answered Sep 29 '22 09:09

Антон Баранов