-
Notifications
You must be signed in to change notification settings - Fork 890
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(agents-api): Add retry policies to workflows/activities executions
- Loading branch information
1 parent
8c17e18
commit 940b6ac
Showing
5 changed files
with
25 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from datetime import timedelta | ||
from temporalio.common import RetryPolicy | ||
|
||
DEFAULT_RETRY_POLICY = RetryPolicy( | ||
initial_interval=timedelta(seconds=1), | ||
backoff_coefficient=2, | ||
maximum_attempts=2, | ||
maximum_interval=timedelta(seconds=10), | ||
non_retryable_error_types=[ | ||
"WorkflowExecutionAlreadyStarted", | ||
"TypeError", | ||
"AssertionError", | ||
"HTTPException", | ||
"SyntaxError", | ||
"ValueError", | ||
], | ||
) |
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
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