Skip to content

Commit

Permalink
refactor: consider timestamp value when comparing grace period
Browse files Browse the repository at this point in the history
  • Loading branch information
roggervalf committed Aug 12, 2023
1 parent 35f4a44 commit 1cb3163
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/includes/cleanList.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ local function cleanList(listKey, jobKeyPrefix, rangeStart, rangeEnd,
-- Fetch all three of these (in that order) and use the first one that is set so that we'll leave jobs
-- that have been active within the grace period:
jobTS = getTimestamp(jobKey, {"finishedOn", "processedOn", "timestamp"})
if (not jobTS or jobTS < timestamp) then
if (not jobTS or jobTS <= timestamp) then
-- replace the entry with a deletion marker; the actual deletion will
-- occur at the end of the script
rcall("LSET", listKey, rangeEnd - jobIdsLen + i, deletionMarker)
Expand Down

0 comments on commit 1cb3163

Please sign in to comment.