Skip to content

Commit

Permalink
fix: Update type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasfarias committed Jun 20, 2024
1 parent 689ccac commit 62f95a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions posthog/temporal/batch_exports/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def rewind_gen() -> collections.abc.Generator[T, None, None]:
@contextlib.asynccontextmanager
async def set_status_to_running_task(
run_id: str | None, logger, timeout: float = 10.0
) -> typing.AsyncIterator[asyncio.Task]:
) -> typing.AsyncIterator[asyncio.Task | None]:
"""Manage a background task to set a batch export run to 'RUNNING' status.
This is intended to be used within a batch export's 'insert_*' activity. These activities cannot afford
Expand All @@ -56,7 +56,7 @@ async def set_status_to_running_task(
"""
if run_id is None:
# Should never land here except in tests of individual activities
yield
yield None
return

background_task = asyncio.create_task(
Expand Down

0 comments on commit 62f95a8

Please sign in to comment.