spiral-modules / jobs

RoadRunner: Background PHP workers, Queue brokers
MIT License
60 stars 11 forks source link

[BUG] Setting maxAttempts don't work #53

Closed ogbofjnr closed 3 years ago

ogbofjnr commented 4 years ago

Version v1.1.3.

maxAttempts don't work as in docs https://spiral.dev/docs/queue-jobs

    local:
        broker: amqp
        queue: my-queue
        maxAttempts: 2

This this setup works instead:

dispatch:
    jobs-remote-*:
      pipeline: beanstalk
      Attempts: 5
      retryDelay: 10
      timeout: 10000
      delay: 10

Looks like somehow tag `json:"maxAttempts,omitempty" don't make effect.

rustatian commented 4 years ago

@ogbofjnr Version 1.1.3 you have mentioned, I guess this is jobs plugin version?

ogbofjnr commented 4 years ago

Yes, and the same problem exists with the latest framework and module version.

jokly commented 3 years ago

Same problem with spiral/jobs v2.2.0 and spiral/roadrunner v1.9.0 It seems that function MatchPipeline is returning incorrect options. It should returns options from Config.Pipelines. So message is published with zero value in headers.

rustatian commented 3 years ago

Thanks for the report @jokly. Unfortunately, I can't take a look right now, but this issue on my radar.

rustatian commented 3 years ago

New jobs will be soon in the RR2.4.0-beta. The current repo (golang part) is deprecated.