Skip to content

Commit 6020209

Browse files
author
Andrei Neagu
committed
docstring + renaming
1 parent 719a530 commit 6020209

File tree

8 files changed

+180
-109
lines changed

8 files changed

+180
-109
lines changed

services/dynamic-scheduler/src/simcore_service_dynamic_scheduler/services/generic_scheduler/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ._api import (
22
cancel_operation,
3-
restart_create_operation_step_in_manual_intervention,
4-
restart_revert_operation_step_in_error,
3+
restart_operation_stuck_in_error_during_revert,
4+
restart_operation_sutck_in_manual_intervention_during_create,
55
start_operation,
66
)
77
from ._deferred_runner import (
@@ -39,8 +39,8 @@
3939
"ParallelStepGroup",
4040
"ProvidedOperationContext",
4141
"RequiredOperationContext",
42-
"restart_create_operation_step_in_manual_intervention",
43-
"restart_revert_operation_step_in_error",
42+
"restart_operation_sutck_in_manual_intervention_during_create",
43+
"restart_operation_stuck_in_error_during_revert",
4444
"ScheduleId",
4545
"SingleStepGroup",
4646
"start_operation",

services/dynamic-scheduler/src/simcore_service_dynamic_scheduler/services/generic_scheduler/_api.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,26 @@ async def start_operation(
2121

2222

2323
async def cancel_operation(app: FastAPI, schedule_id: ScheduleId) -> None:
24-
"""aborts an opration and triggers revert of all it's executed steps"""
25-
await get_core(app).cancel_schedule(schedule_id)
24+
"""puts an operation to revert from the point it currently is"""
25+
await get_core(app).cancel_operation(schedule_id)
2626

2727

28-
async def restart_create_operation_step_in_manual_intervention(
28+
async def restart_operation_sutck_in_manual_intervention_during_create(
2929
app: FastAPI, schedule_id: ScheduleId, step_name: StepName
3030
) -> None:
3131
"""
3232
restarts a step waiting for manual intervention
3333
NOTE: to be used only with steps where `wait_for_manual_intervention()` is True
3434
"""
35-
await get_core(app).restart_operation_step_in_error(
35+
await get_core(app).restart_operation_step_stuck_in_error(
3636
schedule_id, step_name, in_manual_intervention=True
3737
)
3838

3939

40-
async def restart_revert_operation_step_in_error(
40+
async def restart_operation_stuck_in_error_during_revert(
4141
app: FastAPI, schedule_id: ScheduleId, step_name: StepName
4242
) -> None:
4343
"""restarts a step stuck in `revert` in an error state"""
44-
await get_core(app).restart_operation_step_in_error(
44+
await get_core(app).restart_operation_step_stuck_in_error(
4545
schedule_id, step_name, in_manual_intervention=False
4646
)

0 commit comments

Comments
 (0)