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

crash if expires_ms is negative #447

Open
danieleds opened this issue Apr 22, 2024 · 0 comments
Open

crash if expires_ms is negative #447

danieleds opened this issue Apr 22, 2024 · 0 comments

Comments

@danieleds
Copy link

danieleds commented Apr 22, 2024

Here:

https://github.com/samuelcolvin/arq/blob/9d7944bd9d477e8631b34091d97abb03134c3a25/arq/connections.py#L162-L174

If expires_ms is negative (score - enqueue_time_ms + self.expires_extra_ms < 0) then we get a crash:

redis.exceptions.ResponseError: Command # 1 (PSETEX arq:job:677f11b1fbaf40c48b656cf35054851b -2505600000 ��g}�(�t�N�f��XXXX��a��)XXXXXXX����k�}��et���>��u.) of pipeline caused error: ("invalid expire time in 'psetex' command",)

This can happen when setting a negative _defer_by, as suggested here to give the job higher priority.

If the user specified a negative _defer_by, the way the score is computed should change so that the expires_ms is never negative or zero

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

No branches or pull requests

1 participant