Skip to content

Commit 65785b8

Browse files
authored
fix: avoid overwriting consumer list when using more than one consumer (#370)
fix: avoid overwriting consumer list when using more than one consumer thread
1 parent 6dde2bf commit 65785b8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

posthog/client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,9 @@ def __init__(
295295
# to call flush().
296296
if send:
297297
atexit.register(self.join)
298-
for n in range(thread):
299-
self.consumers = []
298+
299+
self.consumers = []
300+
for _ in range(thread):
300301
consumer = Consumer(
301302
self.queue,
302303
self.api_key,

0 commit comments

Comments
 (0)