Clarified the use of task IDs
This commit is contained in:
parent
54106e845f
commit
0aae79a2ad
1 changed files with 8 additions and 8 deletions
|
|
@ -28,10 +28,10 @@ is idle, running, error, or success), information about the start and end times,
|
||||||
the long-running function.
|
the long-running function.
|
||||||
|
|
||||||
By using tasks, a function can be started in the background, and it's return value fetched at a later time once it has reported
|
By using tasks, a function can be started in the background, and it's return value fetched at a later time once it has reported
|
||||||
success.
|
success. If a long-running task is started by some client, it should note the ID returned in the task state JSON, and use this to
|
||||||
|
periodically check on the status of that particular task. API routes have been created to allow checking the state of all tasks
|
||||||
Additionally, API routes have been created to allow checking the state of all tasks, a particular task by ID, removing individual
|
(GET `/task`), a particular task by ID (GET `/task/<task_id>`), removing individual tasks (DELETE `/task/<task_id>`), and pruning
|
||||||
tasks, and pruning the task list of any no-longer-running tasks.
|
the task list of any no-longer-running tasks (DELETE `/task`).
|
||||||
|
|
||||||
An example of a long running task may look like:
|
An example of a long running task may look like:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue