From 39e705c8b987867d675dc6f18327b252646c8684 Mon Sep 17 00:00:00 2001 From: James Greenhill Date: Wed, 20 Sep 2023 15:02:46 -0700 Subject: [PATCH] Revert "fix: check if future exists before grabbing it" (#17563) Revert "fix: check if future exists before grabbing it (#17562)" This reverts commit 94a7bc9ca81f00557f52f0215ff5ce3c7177ee23. --- posthog/api/capture.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/posthog/api/capture.py b/posthog/api/capture.py index 9a7bad8d011a0..c3b45cafef816 100644 --- a/posthog/api/capture.py +++ b/posthog/api/capture.py @@ -426,8 +426,7 @@ def get_event(request): start_time = time.monotonic() for future in futures: try: - if future is not None: - future.get(timeout=settings.KAFKA_PRODUCE_ACK_TIMEOUT_SECONDS - (time.monotonic() - start_time)) + future.get(timeout=settings.KAFKA_PRODUCE_ACK_TIMEOUT_SECONDS - (time.monotonic() - start_time)) except KafkaError as exc: # TODO: distinguish between retriable errors and non-retriable # errors, and set Retry-After header accordingly.