Skip to content

Commit

Permalink
Revert "fix: check if future exists before grabbing it (#17562)"
Browse files Browse the repository at this point in the history
This reverts commit 94a7bc9.
  • Loading branch information
fuziontech authored Sep 20, 2023
1 parent 2f14262 commit 4ac08eb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions posthog/api/capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 4ac08eb

Please sign in to comment.