How can I create delays between failed Queued Job attempts in Laravel?

前端 未结 3 2006
野性不改
野性不改 2021-01-04 13:38

I have a queued job in Laravel that fails from time to time because of an external API failing due to high load. The problem is that my choices appear to be to have the Lara

3条回答
  •  被撕碎了的回忆
    2021-01-04 14:31

    You could manually release the job using the Illuminate\Queue\InteractsWithQueue method

    $this->release(10);
    

    The argument will define the amount of seconds until the job is available again.

    Check the section Manually Releasing Jobs in the official documentation for version 5.1.

提交回复
热议问题