diff --git a/sarracenia/flowcb/retry.py b/sarracenia/flowcb/retry.py index ca4bef880..247476b8b 100755 --- a/sarracenia/flowcb/retry.py +++ b/sarracenia/flowcb/retry.py @@ -102,10 +102,15 @@ def after_accept(self, worklist) -> None: if not features['retry']['present'] or self.o.retry_refilter: return + if len(self.download_retry) < 1: + return + qty = (self.o.batch / 2) - len(worklist.incoming) #logger.info('qty: %d len(worklist.incoming) %d' % ( qty, len(worklist.incoming) ) ) - if qty <= 0: return + if qty <= 0: + logger.info( f"{len(worklist.incoming)} messages to process, too busy to retry" ) + return mlist = self.download_retry.get(qty) @@ -126,6 +131,9 @@ def after_work(self, worklist) -> None: self.download_retry.put(worklist.failed) worklist.failed = [] + if len(self.post_retry) < 1: + return + # retry posting... if (self.o.batch > 2): qty = self.o.batch // 2 - len(worklist.ok)