laravel-queue-rabbitmq icon indicating copy to clipboard operation
laravel-queue-rabbitmq copied to clipboard

$tries and $backoff not working while job failed by timeout

Open jamesRUS52 opened this issue 3 years ago • 1 comments

  • Laravel/Lumen version: v8.38.0
  • RabbitMQ version: RabbitMQ 3.8.16 Erlang 23.3.4
  • Package version: v11.2.0

Describe the bug

$tries and $backoff not working when job failed by timeout

Steps To Reproduce

job class with

public $timeout = 20;
public $tries = 3;
public $backoff = [20,40];

job running time more then 20 sec

Current behavior

after job failed (after 20 sec) it execute again immediatly ($backoff not using) and infinite ($tries not using)

Expected behavior

the second attempt should be after 20 seconds from failed first time the third attempt should be after 40 seconds from failed second time

Additional context

Add any other context about the problem or describe the use-case.

jamesRUS52 avatar May 27 '21 11:05 jamesRUS52

i need to solve this problem too any solution?

yiiman-dev avatar Jan 07 '22 00:01 yiiman-dev

Much like you, at the time I couldn't figure it out either. But I was easily able to come up with a solution that worked for my needs.

See https://github.com/vyuldashev/laravel-queue-rabbitmq/issues/456

M-Porter avatar Jan 31 '23 19:01 M-Porter