seddy¶
Multi-workflow SWF decider and workflow management service.
Classes:
Policy for child executions on parent termination. |
|
|
Workflow registration configuration. |
|
SWF decision builder. |
|
SWF workflow specification. |
|
SWF decision builder from DAG-type workflow specification. |
|
Dag-type SWF workflow specification. |
Functions:
|
Load workflows specifications file. |
-
class
seddy.
ChildPolicy
[source]¶ Bases:
enum.Enum
Policy for child executions on parent termination.
Attributes:
-
ABANDON
= 'ABANDON'¶
-
REQUEST_CANCEL
= 'REQUEST_CANCEL'¶
-
TERMINATE
= 'TERMINATE'¶
-
-
class
seddy.
Registration
(active: bool = True, task_timeout: Union[int, str] = None, execution_timeout: int = None, task_list: str = None, task_priority: int = None, child_policy: seddy._specs._base.ChildPolicy = None, lambda_role: str = None)[source]¶ Bases:
object
Workflow registration configuration.
- Parameters
active – registration status,
False
for deprecatedtask_timeout – default decision task time-out (seconds), or “NONE” for unlimited
execution_timeout – default workflow execution time-out (seconds)
task_list – default decision task-list
task_priority – default decision task priority
child_policy – default policy for child executions upon parent execution termination
lambda_role – default IAM role for Lambda access
Attributes:
Methods:
from_spec
(spec)Construct registration configuration from specification.
-
active
: bool = True¶
-
child_policy
: seddy._specs._base.ChildPolicy = None¶
-
execution_timeout
: int = None¶
-
classmethod
from_spec
(spec: Dict[str, Any])[source]¶ Construct registration configuration from specification.
- Parameters
spec – workflow registration configuration specification
-
lambda_role
: str = None¶
-
task_list
: str = None¶
-
task_priority
: int = None¶
-
task_timeout
: Union[int, str] = None¶
-
class
seddy.
DecisionsBuilder
(workflow: seddy._specs._base.Workflow, task: Dict[str, Any])[source]¶ Bases:
object
SWF decision builder.
- Parameters
workflow – workflow specification
task – decision task
Methods:
Build decisions from workflow history.
-
class
seddy.
Workflow
(name: str, version: str, description: str = None, registration: seddy._specs._base.Registration = None)[source]¶ Bases:
object
SWF workflow specification.
- Parameters
name – workflow name
version – workflow version
registration – workflow registration configuration
Attributes:
Methods:
from_spec
(spec)Construct workflow type from specification.
make_decisions
(task)Build decisions from workflow history.
setup
()Set up workflow specification.
-
abstract property
decisions_builder
¶
-
classmethod
from_spec
(spec: Dict[str, Any])[source]¶ Construct workflow type from specification.
- Parameters
spec – workflow specification
-
make_decisions
(task: Dict[str, Any]) → List[Dict[str, Any]][source]¶ Build decisions from workflow history.
- Parameters
task – decision task
- Returns
workflow decisions
-
abstract property
spec_type
¶
-
class
seddy.
DAGBuilder
(workflow: seddy._specs._dag.DAGWorkflow, task)[source]¶ Bases:
seddy._specs._base.DecisionsBuilder
SWF decision builder from DAG-type workflow specification.
Methods:
Build decisions from workflow history.
-
class
seddy.
DAGWorkflow
(name, version, task_specs: List[seddy._specs._dag.Task], description=None)[source]¶ Bases:
seddy._specs._base.Workflow
Dag-type SWF workflow specification.
- Parameters
name – workflow name
version – workflow version
task_specs – DAG task specifications
Classes:
alias of
DAGBuilder
Attributes:
Methods:
setup
()Set up workflow specification.
-
decisions_builder
¶ alias of
DAGBuilder
Methods:build_decisions
()Build decisions from workflow history.
-
dependants
: t.Dict[t.Union[None, str], t.List[str]] = None¶
-
spec_type
= 'dag'¶
-
seddy.
load_workflows
(workflows_file: pathlib.Path) → List[seddy._specs._base.Workflow][source]¶ Load workflows specifications file.
Determines load method from the file suffix. Supported file types:
JSON
YAML
- Parameters
workflows_file – workflows specifications file path
- Returns
workflows specifications