Skip to content

Commit

Permalink
Revert "fix: check if future exists before grabbing it" (#17563)
Browse files Browse the repository at this point in the history
Revert "fix: check if future exists before grabbing it (#17562)"

This reverts commit 94a7bc9.
  • Loading branch information
fuziontech authored and daibhin committed Sep 21, 2023
1 parent 4ed79a6 commit 39e705c
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 39e705c

Please sign in to comment.