File tree Expand file tree Collapse file tree 2 files changed +36
-1
lines changed
packages/core/minos-microservice-saga/minos/saga/executions Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 22 ABC ,
33 abstractmethod ,
44)
5+ from typing import (
6+ Any ,
7+ Optional ,
8+ )
59from uuid import (
610 UUID ,
711)
@@ -23,10 +27,28 @@ def build_create(self) -> DatabaseOperation:
2327 """
2428
2529 @abstractmethod
26- def build_store (self , uuid : UUID , ** kwargs ) -> DatabaseOperation :
30+ def build_store (
31+ self ,
32+ uuid : UUID ,
33+ definition : dict [str , Any ],
34+ status : str ,
35+ executed_steps : list [dict [str , Any ]],
36+ paused_step : Optional [dict [str , Any ]],
37+ context : str ,
38+ already_rollback : bool ,
39+ user : Optional [UUID ],
40+ ** kwargs
41+ ) -> DatabaseOperation :
2742 """Build the database operation to store a saga execution.
2843
2944 :param uuid: The identifier of the saga execution.
45+ :param definition: The ``Saga`` definition.
46+ :param context: The execution context.
47+ :param status: The status of the execution.
48+ :param executed_steps: The executed steps of the execution.
49+ :param paused_step: The paused step of the execution.
50+ :param already_rollback: ``True`` if already rollback of ``False`` otherwise.
51+ :param user: The user that launched the execution.
3052 :param kwargs: The attributes of the saga execution.
3153 :return: A ``DatabaseOperation`` instance.
3254 """
Original file line number Diff line number Diff line change @@ -71,6 +71,19 @@ def __init__(
7171 * args ,
7272 ** kwargs ,
7373 ):
74+ """Initialize a Saga Execution.
75+
76+ :param definition: The ``Saga`` definition.
77+ :param uuid: The identifier of the execution.
78+ :param context: The execution context.
79+ :param status: The status of the execution.
80+ :param steps: The executed steps of the execution.
81+ :param paused_step: The paused step of the execution.
82+ :param already_rollback: ``True`` if already rollback of ``False`` otherwise.
83+ :param user: The user that launched the execution.
84+ :param args: Additional positional arguments.
85+ :param kwargs: Additional named arguments.
86+ """
7487 definition .validate () # If not valid, raises an exception.
7588
7689 if steps is None :
You can’t perform that action at this time.
0 commit comments