Skip to content

Commit

Permalink
feat: update task status
Browse files Browse the repository at this point in the history
Signed-off-by: SdgJlbl <[email protected]>
  • Loading branch information
SdgJlbl committed Feb 13, 2024
1 parent d16042f commit 478ab8b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions substra/sdk/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ class Status(str, enum.Enum):
"""Status of the task"""

unknown = "STATUS_UNKNOWN"
doing = "STATUS_DOING"
building = "STATUS_BUILDING"
done = "STATUS_DONE"
failed = "STATUS_FAILED"
todo = "STATUS_TODO"
waiting = "STATUS_WAITING"
waiting_for_executor_slot = "STATUS_WAITING_FOR_EXECUTOR_SLOT"
waiting_for_parent_tasks = "STATUS_WAITING_FOR_PARENT_TASKS"
waiting_for_builder_slot = "STATUS_WAITING_FOR_BUILDER_SLOT"
canceled = "STATUS_CANCELED"


Expand Down
4 changes: 3 additions & 1 deletion tests/sdk/test_wait.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ def test_wait_task_failed(client, mocker):
@pytest.mark.parametrize(
("asset_dict", "function_name", "status"),
[
(datastore.TRAINTASK, "wait_task", Status.todo),
(datastore.TRAINTASK, "wait_task", Status.waiting_for_parent_tasks),
(datastore.TRAINTASK, "wait_task", Status.waiting_for_builder_slot),
(datastore.TRAINTASK, "wait_task", Status.waiting_for_executor_slot),
(datastore.COMPUTE_PLAN, "wait_compute_plan", ComputePlanStatus.todo),
],
ids=_param_name_maker,
Expand Down

0 comments on commit 478ab8b

Please sign in to comment.