Ranx99
6 months ago
529
1
Laravel

Job' retryUntil doesn't work for some reason

Posted 6 months ago by Ranx99

I have this job which uses retryUntil

class ExampleJob implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    public function handle()
    {
        throw new \RuntimeException('oops');
    }

    public function retryUntil()
    {
        return now()->addSeconds(5);
    }
}

When I run this job I am expecting that, when it fails it will run again and again until 5 seconds are over. But it only runs one time. why?

enter image description here

Please sign in or create an account to participate in this conversation.