Laravel Jobs and Reserved Status or Reserved Queue

I have a script running as a job when clicked in a queue. I have a couple more queues, and they are all managed by a supervisor. I am using Redis as a queue driver with Laravel 4.2.

I want to know about the different statuses of tasks:

  • Waiting for a task
  • Unsuccessful task
  • Reserved Task

The problem with these different statuses is that I have thousands of tasks in the reserved queue queue:xyz:reserved(I don’t know why) that are placed in the queue queue:xyz, and blocks of these tasks (from the reserved queue) are doing new tasks.

The following is a command executed by a supervisor to process tasks:    php artisan queue:work --queue=xyz --tries=1 --daemon --env=prodEnv  My questions / questions:

  • why the job is running in a reserved queue / state
  • why does he return to the original Laravel queue?
  • What is the difference between failed and reserved work? OR
  • When is a task marked / considered unsuccessful or reserved?

The process of dragging the reserved tasks into the initial queue slows down the processing of new tasks in the queue, which I want to do faster by processing these reserved tasks.

+4
source share
1 answer

I had the same problem and was finally able to figure it out.

In my case, it was due to a runtime error.

, A, B, C. C , A B, , , , C .

, Job, , C, .

, , .

0

Source: https://habr.com/ru/post/1674155/


All Articles