forked from FoundatioFx/Foundatio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add unit test to reproduce the issue FoundatioFx#64 (FoundatioFx#65)
fixed issue FoundatioFx#64 - DequeueIdAsync might leave queue item in "phantom" state
- Loading branch information
1 parent
2239399
commit 82859e3
Showing
4 changed files
with
133 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
local item = redis.call('RPOPLPUSH', @queueListName, @workListName); | ||
if item then | ||
local dequeuedTimeKey = 'q:' .. @queueName .. ':' .. item .. ':dequeued'; | ||
local renewedTimeKey = 'q:' .. @queueName .. ':' .. item .. ':renewed'; | ||
redis.call('SET', dequeuedTimeKey, @now, 'EX', @wiTimeoutTtl); | ||
redis.call('SET', renewedTimeKey, @now, 'EX', @wiTimeoutTtl); | ||
return item; | ||
else | ||
return nil; | ||
end |
This file contains 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