-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
enhancementMakes Docket betterMakes Docket better
Description
Using a timeout as a dependency opens up some interesting use cases for bumping that timeout periodically through the execution of the task, almost like a mini heartbeat:
async def my_long_running_task(
timeout: Timeout = Timeout(base=timedelta(seconds=10))
) -> None:
for batch in get_batch_of_work():
for item in batch:
do_a_thing(item)
timeout.extend() # bumps by another 10 seconds by defaultMetadata
Metadata
Assignees
Labels
enhancementMakes Docket betterMakes Docket better