We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd7f2fa commit 4b4d5a2Copy full SHA for 4b4d5a2
services/storage/src/simcore_service_storage/modules/celery/models.py
@@ -1,3 +1,4 @@
1
+from enum import StrEnum, auto
2
from typing import Any, TypeAlias
3
from uuid import UUID
4
@@ -9,7 +10,15 @@
9
10
TaskUUID: TypeAlias = UUID
11
12
13
+class TaskState(StrEnum):
14
+ PENDING = auto()
15
+ STARTED = auto()
16
+ SUCCESS = auto()
17
+ FAILURE = auto()
18
+ ABORTED = auto()
19
+
20
21
class TaskStatus(BaseModel):
22
task_uuid: TaskUUID
- task_state: str # add enum
23
+ task_state: TaskState
24
progress_report: ProgressReport | None = None
0 commit comments