_statuses uuid should not removed when expired but the status:uuid key-value exists - #85
Open
comme wants to merge 3 commits into
Open
_statuses uuid should not removed when expired but the status:uuid key-value exists#85comme wants to merge 3 commits into
comme wants to merge 3 commits into
Conversation
Owner
|
@comme Ah, yeah - this makes sense. However, I think a cleaner way to do this would be to just update the score/timestamp with ZSET whenever a message is written to the status/uuid so ZREMRANGEBYSCORE still works as expected and you never have to loop through the entire ZSET (potentially really slow for a lot of statuses) |
Author
|
@quirkey There is no ZSET command exists in redis but ZINCRBY and i don't think update the score/timestamp when a message is written to the status/uuid is a good solution, because after statuses expired (this periods of time i don't update uuid message) i call Resque::Plugins::Status::Hash.create before Resque::Plugins::Status::Hash.set the statuses will remove before you update the score/timestamp. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
when i set
and i create a job get uuid1 and do
after 60 second i create another job,in resque-web statuses page i can't find uuid1's info but status:uuid still exists in redis.
so i think _statuses uuid should not removed when expired but the status:uuid key-value exists.