Skip to content

Commit

Permalink
fix: Type hints and early return
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasfarias committed Jun 24, 2024
1 parent 5bd140c commit 314eaa6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions posthog/temporal/batch_exports/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ async def try_set_batch_export_run_to_running(run_id: str | None, logger, timeou
the status. This means that, worse case, the batch export status won't be displayed as 'RUNNING' while running.
"""
if run_id is None:
# Should never land here except in tests of individual activities
yield
return

background_task = asyncio.create_task(
Expand Down

0 comments on commit 314eaa6

Please sign in to comment.