diff --git a/docs/nav/reference/config.md b/docs/nav/reference/config.md index d6e467e1..7774cfbd 100644 --- a/docs/nav/reference/config.md +++ b/docs/nav/reference/config.md @@ -3,7 +3,7 @@ ::: dotflow.core.config.Config options: members: - - path - - task_path - - log_path - - output + - storage + - notify + - log + - api diff --git a/docs/nav/reference/context.md b/docs/nav/reference/context.md index cb2b9fff..83af5824 100644 --- a/docs/nav/reference/context.md +++ b/docs/nav/reference/context.md @@ -7,6 +7,3 @@ - task_id - workflow_id - storage - - result_task - - result_context - - result_storage diff --git a/docs/nav/reference/dotflow.md b/docs/nav/reference/dotflow.md index 2cee5481..a4c01702 100644 --- a/docs/nav/reference/dotflow.md +++ b/docs/nav/reference/dotflow.md @@ -9,3 +9,4 @@ - result_task - result_context - result_storage + - result diff --git a/docs/nav/reference/task-builder.md b/docs/nav/reference/task-builder.md index 80231473..174b780f 100644 --- a/docs/nav/reference/task-builder.md +++ b/docs/nav/reference/task-builder.md @@ -7,3 +7,5 @@ - count - clear - reverse + - schema + - result diff --git a/docs/nav/reference/task-instance.md b/docs/nav/reference/task-instance.md index 6f4faa63..c3746b4a 100644 --- a/docs/nav/reference/task-instance.md +++ b/docs/nav/reference/task-instance.md @@ -11,7 +11,8 @@ - _initial_context - _current_context - _duration - - _error + - _errors - _status - _config - - group_name \ No newline at end of file + - group_name + - retry_count \ No newline at end of file diff --git a/docs/nav/reference/workflow.md b/docs/nav/reference/workflow.md index 78c6a90a..20594662 100644 --- a/docs/nav/reference/workflow.md +++ b/docs/nav/reference/workflow.md @@ -5,5 +5,6 @@ members: - _callback_workflow - sequential + - sequential_group - background - parallel diff --git a/dotflow/core/action.py b/dotflow/core/action.py index bc6ecad5..d3138cb0 100644 --- a/dotflow/core/action.py +++ b/dotflow/core/action.py @@ -72,7 +72,7 @@ def my_task(): retry_delay (int): Retry delay on task on_failure. Duration (in seconds) - backoff (int): Exponential backoff + backoff (bool): Exponential backoff. Doubles retry_delay after each attempt. """ diff --git a/dotflow/core/config.py b/dotflow/core/config.py index 7939e78a..9d4cba1a 100644 --- a/dotflow/core/config.py +++ b/dotflow/core/config.py @@ -37,7 +37,7 @@ class Config: Args: storage (Optional[Storage]): Type of the storage. notify (Optional[Notify]): Type of the notify. - log (Optional[Log]): Type of the notify. + log (Optional[Log]): Type of the log. Attributes: storage (Optional[Storage]): diff --git a/dotflow/core/dotflow.py b/dotflow/core/dotflow.py index f5d61903..d21a6553 100644 --- a/dotflow/core/dotflow.py +++ b/dotflow/core/dotflow.py @@ -30,6 +30,9 @@ class DotFlow: Args: config (Optional[Config]): Configuration class. + workflow_id (Optional[str]): Fixed workflow identifier for checkpoint + resume. If not provided, a random UUID is generated. + Attributes: workflow_id (UUID): diff --git a/dotflow/core/workflow.py b/dotflow/core/workflow.py index 1ea0ba40..5e7b9bab 100644 --- a/dotflow/core/workflow.py +++ b/dotflow/core/workflow.py @@ -73,6 +73,11 @@ class Manager: workflow_id (UUID): Workflow ID. + resume (bool): + If True, checks for existing checkpoints before executing each task. + Tasks with a checkpoint are skipped and their saved context is used. + Requires a persistent storage provider and a fixed workflow_id. + Attributes: on_success (Callable):