acaloiaro / neoq

Queue-agnostic background job library for Go, with a pleasant API and powerful features.
MIT License
270 stars 4 forks source link

MaxRetries not getting set #85

Closed BillBuilt closed 1 year ago

BillBuilt commented 1 year ago

Job MaxRetries field is not being saved and always defaults to '23':

https://github.com/acaloiaro/neoq/blob/de2e101736644178505d943ec4d449253b152ada/backends/postgres/postgres_backend.go#L422

acaloiaro commented 1 year ago

Thanks @BillBuilt -- confirmed. This will be fixed when #86 is merged.

BillBuilt commented 1 year ago

Thanks! FWIW: I could not find any references to "max retries" in any of the backends, but I wasn't searching very thoroughly in the others.

acaloiaro commented 1 year ago

Retries for the Redis backend are implemented in asynq. However, the mem backend also appears to not be handling max retries correctly and that'll need to be fixed as well.

I'll use this as an opportunity to increase test coverage.

acaloiaro commented 1 year ago

Hi @BillBuilt I'm going to go ahead and merge the postgres fix for you and open up a new issue to work on the mem backend. Thanks for the report!

BillBuilt commented 1 year ago

Just in time for my unit tests! Thank you!

Bill

acaloiaro commented 1 year ago

Excellent!