Skip to content

Commit 0b14eb1

Browse files
committed
Fixed Tracker.flush() to work with a RedisEmitter
1 parent 5dd87f2 commit 0b14eb1

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

snowplow_tracker/tracker.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,10 +358,12 @@ def flush(self, async=False):
358358
:rtype: tracker | list(int)
359359
"""
360360
if async:
361-
self.emitter.flush()
361+
for e in self.emitters:
362+
e.flush()
362363
return self
363364
else:
364-
return self.emitter.sync_flush()
365+
results = [emitter.sync_flush() for emitter in self.emitters]
366+
return [r for r in results if r is not None]
365367

366368
@contract
367369
def set_subject(self, subject):

0 commit comments

Comments
 (0)