yii2-queue
yii2-queue copied to clipboard
The queue task was delayed in ttr seconds
What steps will reproduce the problem?
I set parameter ttr=7200, seconds。 I found a strange phenomenon that the task was not wrong but it was executed after 7200 seconds. My config like this: 'dataExport' => [ 'class' => yii\queue\redis\Queue::class, 'channel' => 'dataExportQueue', 'as log' => common\behaviors\QueueLogBehavior::class, 'ttr' => 7200, ],
What's expected?
I guess it should execute immediately but I didn t get task feedback.
What do you get instead?
Additional info
Normally, the Queue were executed immediately and delayed only a few times.
Thanks for posting in our issue tracker. In order to properly assist you, we need additional information:
- When does the issue occur?
- What do you see?
- What was the expected result?
- Can you supply us with a stacktrace? (optional)
- Do you have exact code to reproduce it? Maybe a PHPUnit tests that fails? (optional)
Thanks!
This is an automated comment, triggered by adding the label status:need more info
.
When does the issue occur? When I push a task to the queue it happens.
What do you see? The task was not performed immediately.After 7200 seconds I found the update record in the database and I knew it was executed and I prepared to calculate the time it was executed after ttr seconds.
What was the expected result? I expected it to execute immediately but it was not immediately and there was no relevant error.
Can you supply us with a stacktrace? (optional)
Do you have exact code to reproduce it? Maybe a PHPUnit tests that fails? (optional)
Does that happen with any task every time? In order to fix an issue we need to somehow reproduce it.
No.It is normal for a long time, occasionally such problems.I have no way to reproduce it either.
I'm not sure if this is related to supervisor
as I use it as a process management for Yii Queue and the odd phenomenon is that when Queue was delayed after ttr seconds I found that supervisor restarted Yii Queue.
That should be connected.
Is there any good solution