Skip to content

Commit

Permalink
Bug fix: Remove test/debug situations
Browse files Browse the repository at this point in the history
  • Loading branch information
HamadaSalhab committed Oct 3, 2024
1 parent ccd01db commit 2d945d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 2 additions & 5 deletions agents-api/agents_api/common/retry_policies.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
from datetime import timedelta

from temporalio.common import RetryPolicy
from ..env import debug, testing

DEFAULT_RETRY_POLICY = RetryPolicy(
initial_interval=timedelta(seconds=1),
backoff_coefficient=2,
maximum_attempts=2 if debug or testing else 25,
maximum_interval=timedelta(seconds=10)
if debug or testing
else timedelta(seconds=300),
maximum_attempts=25,
maximum_interval=timedelta(seconds=300),
non_retryable_error_types=[
# Temporal-specific errors
"WorkflowExecutionAlreadyStarted",
Expand Down
3 changes: 2 additions & 1 deletion agents-api/agents_api/workflows/task_execution/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from temporalio import workflow
from temporalio.exceptions import ApplicationError

from ...common.retry_policies import DEFAULT_RETRY_POLICY

# Import necessary modules and types
with workflow.unsafe.imports_passed_through():
Expand Down Expand Up @@ -55,6 +54,8 @@
execute_switch_branch,
)
from .transition import transition
from ...common.retry_policies import DEFAULT_RETRY_POLICY


# Supported steps
# ---------------
Expand Down

0 comments on commit 2d945d3

Please sign in to comment.