Skip to content

Close #359#364

Merged
mhenrixon merged 3 commits intomasterfrom
close-359
Jan 10, 2019
Merged

Close #359#364
mhenrixon merged 3 commits intomasterfrom
close-359

Conversation

@mhenrixon
Copy link
Copy Markdown
Owner

Should fix and close #359

Comment thread redis/unlock.lua

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

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
Copy Markdown
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
Copy Markdown

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