Skip to content

Commit

Permalink
add on failure parameter to imperative workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
400Ping committed Nov 6, 2024
1 parent 2fbdc63 commit 0e5fba8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions flytekit/core/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,10 +420,11 @@ class ImperativeWorkflow(WorkflowBase):
"""

def __init__(
self,
name: str,
failure_policy: Optional[WorkflowFailurePolicy] = None,
interruptible: bool = False,
self,
name: str,
failure_policy: Optional[WorkflowFailurePolicy] = None,
interruptible: bool = False,
on_failure: Optional[Union[WorkflowBase, Task]] = None,
):
metadata = WorkflowMetadata(on_failure=failure_policy or WorkflowFailurePolicy.FAIL_IMMEDIATELY)
workflow_metadata_defaults = WorkflowMetadataDefaults(interruptible)
Expand Down

0 comments on commit 0e5fba8

Please sign in to comment.