'Why Laravel Event Queue Keep Using Old Source That Not Exist
Hi I'm using queue to run a task, in the task there simple function that hit another api to post data, now I change that code to use kafka and remove the proses to post to api
The problem is, the queue is randomly use old source code(hit the api, and not using kafka), and I don't know why
I'am using
php artisan queue:work
with database driver queue, on laravel 5.6
I try some tips, just like
php artisan queue:restart
php artisan queue:flush
php artisan cache:clear
php artisan config:clear
composer dump-autoload
composer dumpautoload -o
and reinstall the laravel vendor
but the queue still randomly use old source code,
how can I solve this, so the queue use the latest code
Thanks
Solution 1:[1]
Okay, I found the problem, so this is because using 2 servers with same queue connection (database), 1 server is using the latest code and another server is using the old code
So the supervisor on the another server with old code must be stopped
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Existed Mocha |
