Skip to content

Commit

Permalink
test: Clean up coverage issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bmtcril committed Apr 1, 2024
1 parent c84ac9f commit bc54562
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions event_routing_backends/backends/events_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def queue_event(self, redis, event):
batch = [i for n, i in enumerate(batch) if i not in batch[n + 1:]]
final_size = len(batch)

if final_size != orig_size:
if final_size != orig_size: # pragma: no cover
logger.warning(f"{orig_size - final_size} duplicate events in event-routing-backends batch queue! "
f"This is a likely due to misconfiguration of EVENT_TRACKING_BACKENDS.")
return batch
Expand All @@ -250,9 +250,6 @@ def time_to_send(self, redis):
time_passed = (datetime.now() - datetime.fromisoformat(last_sent.decode('utf-8')))
ready = time_passed > timedelta(seconds=settings.EVENT_ROUTING_BACKEND_BATCH_INTERVAL)

if ready:
logger.info(f'Time to send: {time_passed} elapsed since last send.')

return ready

def process_event(self, event):
Expand Down

0 comments on commit bc54562

Please sign in to comment.