MCPcopy Create free account
hub / github.com/pallets/flask / process

Function process

examples/celery/src/task_app/tasks.py:18–23  ·  view source on GitHub ↗
(self: Task, total: int)

Source from the content-addressed store, hash-verified

16
17@shared_task(bind=True, ignore_result=False)
18def process(self: Task, total: int) -> object:
19 for i in range(total):
20 self.update_state(state="PROGRESS", meta={"current": i + 1, "total": total})
21 time.sleep(1)
22
23 return {"current": total, "total": total}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected