Skip to content
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.

Commit

Permalink
fix(queue): atomicity fix in read_message
Browse files Browse the repository at this point in the history
  • Loading branch information
asher authored and robfletcher committed Apr 23, 2018
1 parent 7d54a6b commit 9bd389e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ private const val READ_MESSAGE_WITH_LOCK = """
local i=1
while (i <= #fingerprints) do
redis.call("ECHO", "attempting lock on " .. fingerprints[i])
if redis.call("SET", locksKey .. ":" .. fingerprints[i], "\uD83D\uDD12", "EX", lockTtlSeconds, "NX") ~= nil then
if redis.call("SET", locksKey .. ":" .. fingerprints[i], "\uD83D\uDD12", "EX", lockTtlSeconds, "NX") then
redis.call("ECHO", "acquired lock on " .. fingerprints[i])
return fingerprints[i], fingerprints[i+1]
end
Expand Down

0 comments on commit 9bd389e

Please sign in to comment.