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 Job waiting to be executed
- The Failed Job
- The Reserved Job
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:
- why a job is pushed in the reserved queue/state
- why is it pushed back to the original queue by the Laravel?
- What is the difference between the failed and reserved job? OR
- When is a job marked/considered as failed or reserved?
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.