Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX set default job ttl as rq's registry ttl #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

jaumef
Copy link

@jaumef jaumef commented Apr 10, 2019

  • FIX set default job ttl as rq's registry ttl

From rq's registry add: https://github.com/rq/rq/blob/master/rq/registry.py#L53

Case to fix

>ttl=None
>ttl if ttl < 0 else 123456 + ttl
None

Other Cases

>ttl=0
>ttl if ttl < 0 else 123456 + ttl
0
>ttl=-1
>ttl if ttl < 0 else 123456 + ttl
-1
>ttl=1
>ttl if ttl < 0 else 123456 + ttl
123457

If TTL is NONE, SCORE is NONE and ZADD fails
@jaumef jaumef requested review from ecarreras and tinogis April 10, 2019 17:23
@jaumef jaumef self-assigned this Apr 10, 2019
@coveralls
Copy link

Coverage Status

Coverage remained the same at 0.0% when pulling bdbcedf on fix_job_ttl into fdb2857 on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants