I have a script run as a job when pushed in a queue. I have a couple of other queues and all of these are handled by the supervisord. I am using the Redis as a queue driver with Laravel 4.2.
I want to know about the different statuses of the jobs:
The problem with these different statuses is that I have thousands of the jobs in the reserved queue queue:xyz:reserved
(I don't know why) which are pushed in the queue queue:xyz
and these jobs(from reserved queue) blocks the execution of the newly pushed jobs.
Following is the command run by the supervisord to process the jobs:
php artisan queue:work --queue=xyz --tries=1 --daemon --env=prodEnv
My question/s are:
The process of pushing the reserved jobs to the original queue slows down the processing of the new jobs in the queue which I want to make it faster by handling these reserved jobs things.
I had the same issue and was able to finally sort it out.
In my case, this was because of a run time error.
I had a job which had sections of code say A,B,C. Section C caused a run time error every time and while I could see the effects of sections A and B as expected, I noticed the job was pushed to reserved state and the effects of executing section C were not observed.
Interestingly enough, I had another Job running that fixed the run time error some time later and then section C was executed and the job was removed from reserved jobs.
This may not answer all of your questions directly but I hope it helps in finding them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With