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

Close #359 #364

Merged
merged 3 commits into from
Jan 10, 2019
Merged

Close #359 #364

merged 3 commits into from
Jan 10, 2019

Conversation

mhenrixon
Copy link
Owner

Should fix and close #359

@@ -28,5 +28,7 @@ else
redis.call('DEL', unique_digest) -- TODO: Legacy support (Remove in v6.1)
end

return redis.call('LPUSH', available_key, token)
local count = redis.call('LPUSH', available_key, token)
redis.call('EXPIRE', available_key, 5)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious as to why you picked 5 seconds here. Worth making a constant?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No particular reason, do you think 5 is too high? Too low? I mean the key doesn't really do anything except signal to locks that are waiting that the key is now available.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah was just curious - sort of a magic number if you're reading that code without context

@mhenrixon mhenrixon merged commit 12924de into master Jan 10, 2019
@mhenrixon mhenrixon deleted the close-359 branch January 10, 2019 21:54
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.

(6.0.7) uniquejobs:{digest}:AVAILABLE keys never expire
2 participants