Skip to content

Commit

Permalink
fix #920 add _isRetry when retrieving from retry queue
Browse files Browse the repository at this point in the history
  • Loading branch information
petersilva committed Feb 13, 2024
1 parent de7c617 commit fd64388
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 1 addition & 3 deletions sarracenia/flowcb/nodupe/disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,6 @@ def after_accept(self, worklist):

if self.o.fileAgeMin > 0:
max_mtime = self.now - self.o.fileAgeMin
elif type(self.o.inflight) in [ int, float ] and self.o.inflight > 0:
max_mtime = self.now - self.o.inflight
else:
# FIXME: should we add some time here to allow for different clocks?
# 100 seconds in the future? hmm...
Expand All @@ -177,7 +175,7 @@ def after_accept(self, worklist):
worklist.rejected.append(m)
continue

if self.check_message(m):
if '_isRetry' in m or self.check_message(m):
new_incoming.append(m)
else:
m['_deleteOnPost'] |= set(['reject'])
Expand Down
2 changes: 1 addition & 1 deletion sarracenia/flowcb/nodupe/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def after_accept(self, worklist):
worklist.rejected.append(m)
continue

if self._is_new(m):
if '_isRetry' in m or self._is_new(m):
new_incoming.append(m)
else:
m['_deleteOnPost'] |= set(['reject'])
Expand Down
4 changes: 3 additions & 1 deletion sarracenia/flowcb/retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ def gather(self, qty) -> None:
for k in m:
if k in m['_deleteOnPost'] or k.startswith('new_'):
del m[k]
del m['_deleteOnPost']
m['_isRetry'] = True
m['_deleteOnPost'] = set( [ '_isRetry' ] )


return message_list

Expand Down

0 comments on commit fd64388

Please sign in to comment.