Closed KarlBishop closed 2 years ago
I'll look into this.
This should do the trick:
// config/app.php
return [
'components' => [],
'bootstrap' => [
function () {
\yii\base\Event::on(
\yii\queue\Queue::class,
\yii\queue\Queue::EVENT_BEFORE_PUSH,
function (\yii\queue\PushEvent $event) {
$event->ttr = 1234;
}
);
}
]
];
Fantastic - thanks!
We have occasional long-running queue jobs, like Blitz Cache Warmer and FeedMe imports, that need a very large
ttr
(time to reserve).Is there a way I can increase
ttr
when using this plugin?I have a custom value set in app.php (
'components' => [ 'queue' => [ 'ttr' => 1800
) but new jobs are now created with ttr of300
.Great work anyway! If it's not possible at the moment then I'd be interested to know what you think of this as a feature request.