Skip to content

Commit

Permalink
chore: rename ComputeTask DOING to EXECUTING
Browse files Browse the repository at this point in the history
Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
  • Loading branch information
guilhem-barthes committed Feb 19, 2024
1 parent 32e354c commit 1fb2d3d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion references/sdk_models.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ ComputePlan
- building_count: <class 'int'>
- waiting_parent_tasks_count: <class 'int'>
- waiting_executor_slot_count: <class 'int'>
- doing_count: <class 'int'>
- executing_count: <class 'int'>
- canceled_count: <class 'int'>
- failed_count: <class 'int'>
- done_count: <class 'int'>
Expand Down
2 changes: 1 addition & 1 deletion substra/sdk/backends/local/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ def _add_compute_plan(self, spec: schemas.ComputePlanSpec, spec_options: dict =
building_count=0,
waiting_parent_tasks_count=0,
waiting_executor_slot_count=0,
doing_count=0,
executing_count=0,
canceled_count=0,
failed_count=0,
done_count=0,
Expand Down
2 changes: 1 addition & 1 deletion substra/sdk/backends/local/compute/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def schedule_task(self, task: models.Task):
task: Task to execute
"""
with self._context(task.key) as task_dir:
task.status = models.ComputeTaskStatus.doing
task.status = models.ComputeTaskStatus.executing
task.start_date = datetime.datetime.now()
function = self._db.get_with_files(schemas.Type.Function, task.function.key)
input_multiplicity = {i.identifier: i.multiple for i in function.inputs}
Expand Down
4 changes: 2 additions & 2 deletions substra/sdk/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ComputeTaskStatus(str, enum.Enum):

unknown = "STATUS_UNKNOWN"
building = "STATUS_BUILDING"
doing = "STATUS_DOING"
executing = "STATUS_EXECUTING"
done = "STATUS_DONE"
failed = "STATUS_FAILED"
waiting_for_executor_slot = "STATUS_WAITING_FOR_EXECUTOR_SLOT"
Expand Down Expand Up @@ -323,7 +323,7 @@ class ComputePlan(_Model):
building_count: int = 0
waiting_parent_tasks_count: int = 0
waiting_executor_slot_count: int = 0
doing_count: int = 0
executing_count: int = 0
canceled_count: int = 0
failed_count: int = 0
done_count: int = 0
Expand Down
4 changes: 2 additions & 2 deletions tests/datastore.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
"creation_date": "2021-08-24T13:36:07.393646367Z",
"compute_plan_key": "ed74db2f-b302-4a9d-b3d3-336eb8dcc3ff",
"metadata": {},
"status": "STATUS_DOING",
"status": "STATUS_EXECUTING",
"worker": "MyOrg2MSP",
"rank": 0,
"tag": "",
Expand Down Expand Up @@ -596,7 +596,7 @@
"building_count": 0,
"waiting_parent_tasks_count": 1,
"waiting_executor_slot_count": 2,
"doing_count": 3,
"executing_count": 3,
"canceled_count": 4,
"failed_count": 5,
"done_count": 6,
Expand Down

0 comments on commit 1fb2d3d

Please sign in to comment.