Open
Description
I want to make each retry attempt each time more delayed. However, I could not do it, because there is no delay
property in ErrorEvent:
Yii::$app->queue->on(Queue::EVENT_AFTER_ERROR, function (ErrorEvent $event) {
if ($event->job instanceof SomeJob) {
//$event->delay = $event->attempt * 30; // there I want to set delay based on attempt
$event->retry = $event->attempt < 5;
}
});
It would also be nice to add in the RetryableJob method getRetryDelay
:
public function getRetryDelay($attempt, $error)
{
return $attempt * 30;
}