-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
devxMakes Docket the most ergonomic background task systemMakes Docket the most ergonomic background task systemenhancementMakes Docket betterMakes Docket better
Description
As an extension to the timeout idea in #87, a similar interface could be used to express intermediate progress (visible on the snapshot or programmatically):
async def long_running(
progress: Progress = Progress()
) -> None:
batch = get_some_work()
progress.set_total(len(batch))
for item in batch:
do_some_work(item)
progress.increment() # 1 by default, but could be other valuesThis could be asynchronously incrementing an ephemeral redis key to show progress for this specific task.
Metadata
Metadata
Assignees
Labels
devxMakes Docket the most ergonomic background task systemMakes Docket the most ergonomic background task systemenhancementMakes Docket betterMakes Docket better