Commit 0aae79a2 authored by Joel Collins's avatar Joel Collins
Browse files

Clarified the use of task IDs

parent 54106e84
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -28,10 +28,10 @@ is idle, running, error, or success), information about the start and end times,
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
success.

Additionally, API routes have been created to allow checking the state of all tasks, a particular task by ID, removing individual
tasks, and pruning the task list of any no-longer-running tasks.
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 
(GET `/task`), a particular task by ID (GET `/task/<task_id>`), removing individual tasks (DELETE `/task/<task_id>`), and pruning 
the task list of any no-longer-running tasks (DELETE `/task`).

An example of a long running task may look like: