Skip to content

Commit b13337f

Browse files
author
Andrei Neagu
committed
expose NoDataFoundError and added note
1 parent 84dc9ae commit b13337f

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

packages/models-library/tests/test__pydantic_models_and_enums.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def test_equivalent_enums_are_not_strictly_equal():
3030
#
3131
# Here two equivalent enum BUT of type str-enum
3232
#
33-
# SEE from models_library.utils.enums.AutoStrEnum
33+
# SEE from models_library.utils.enums.StrAutoEnum
3434
# SEE https://docs.pydantic.dev/dev-v2/usage/types/enums/
3535
#
3636

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@
2929
ParallelStepGroup,
3030
SingleStepGroup,
3131
)
32-
from ._store import OperationContextProxy, StepGroupProxy, StepStoreProxy
32+
from ._store import (
33+
NoDataFoundError,
34+
OperationContextProxy,
35+
StepGroupProxy,
36+
StepStoreProxy,
37+
)
3338

3439
__all__: tuple[str, ...] = (
3540
"BaseStep",
@@ -39,6 +44,7 @@
3944
"get_operation_name_or_none",
4045
"get_step_group_proxy",
4146
"get_step_store_proxy",
47+
"NoDataFoundError",
4248
"Operation",
4349
"OperationContextProxy",
4450
"OperationName",

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ async def restart_operation_step_stuck_in_error(
244244
"""
245245
Force a step stuck in an error state to retry.
246246
Will raise errors if step cannot be retried.
247+
248+
raises NoDataFoundError
247249
"""
248250
schedule_data_proxy = ScheduleDataStoreProxy(
249251
store=self._store, schedule_id=schedule_id
@@ -749,6 +751,8 @@ async def cancel_operation(app: FastAPI, schedule_id: ScheduleId) -> None:
749751
750752
`reverting` refers to the act of reverting the effects of a step
751753
that has already been completed (eg: remove a created network)
754+
755+
raises NoDataFoundError
752756
"""
753757
await Core.get_from_app_state(app).cancel_operation(schedule_id)
754758

@@ -770,6 +774,8 @@ async def restart_operation_step_stuck_in_manual_intervention_during_execute(
770774
`waiting for manual intervention` refers to a step that has failed and exhausted
771775
all retries and is now waiting for a human to fix the issue (eg: storage service
772776
is reachable once again)
777+
778+
raises NoDataFoundError
773779
"""
774780
await Core.get_from_app_state(app).restart_operation_step_stuck_in_error(
775781
schedule_id, step_name, in_manual_intervention=True
@@ -785,6 +791,8 @@ async def restart_operation_step_stuck_during_revert(
785791
`stuck step` is a step that has failed and exhausted all retries
786792
`reverting` refers to the act of reverting the effects of a step
787793
that has already been completed (eg: remove a created network)
794+
795+
raises NoDataFoundError
788796
"""
789797
await Core.get_from_app_state(app).restart_operation_step_stuck_in_error(
790798
schedule_id, step_name, in_manual_intervention=False

0 commit comments

Comments
 (0)