-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Brent Johnson
committed
Nov 3, 2023
1 parent
8d850ce
commit 131625e
Showing
2 changed files
with
15 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,8 @@ wf = Workflow( # (1)! | |
email_notifications=EmailNotifications( | ||
on_start=["[email protected]"], | ||
on_success=["[email protected]"], | ||
on_failure=["[email protected]"] | ||
on_failure=["[email protected]"], | ||
on_duration_warning_threshold_exceeded=["[email protected]"] | ||
), | ||
timeout_seconds=timedelta(hours=2).seconds | ||
), | ||
|
@@ -44,6 +45,11 @@ wf = Workflow( # (1)! | |
"catalog": "development", | ||
"database": "your_database" | ||
}, | ||
health = { # (16)! | ||
"metric": "RUN_DURATION_SECONDS", | ||
"op": "GREATER_THAN", | ||
"value": 7200 | ||
} | ||
) | ||
|
||
|
||
|
@@ -67,6 +73,7 @@ def task_function(*, test="var"): | |
13. Define the common task parameters that can be used in all the tasks | ||
14. Define a workflow task and associate it to the workflow | ||
15. Define the schedule pause status. It is defaulted to "UNPAUSED" | ||
16. Define health check condition that triggers duration warning threshold exceeded notifications | ||
|
||
### Clusters | ||
|
||
|
@@ -207,7 +214,8 @@ default_task_settings=TaskSettings( | |
email_notifications=EmailNotifications( | ||
on_start=["[email protected]"], | ||
on_success=["[email protected]"], | ||
on_failure=["[email protected]"] | ||
on_failure=["[email protected]"], | ||
on_duration_warning_threshold_exceeded=["[email protected]"] | ||
), | ||
timeout_seconds=timedelta(hours=2).seconds, | ||
max_retries=2, | ||
|
@@ -249,4 +257,5 @@ common_task_parameters={ | |
"catalog": "development", | ||
"database": "your_database" | ||
} | ||
``` | ||
``` | ||
|