We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f767833 commit 44f2848Copy full SHA for 44f2848
packages/service-library/src/servicelib/background_task.py
@@ -46,9 +46,11 @@ async def _periodic_scheduled_task(
46
**task_kwargs,
47
) -> None:
48
# NOTE: This retries forever unless cancelled
49
- nap = asyncio.sleep
50
- if early_wake_up_event is not None:
51
- nap = SleepUsingAsyncioEvent(early_wake_up_event)
+ nap = (
+ asyncio.sleep
+ if early_wake_up_event is None
52
+ else SleepUsingAsyncioEvent(early_wake_up_event)
53
+ )
54
async for attempt in AsyncRetrying(
55
sleep=nap,
56
wait=wait_fixed(interval.total_seconds()),
0 commit comments