Skip to content

Commit

Permalink
fix: Add default max_retries to Job.wait_until_complete to avoid infi…
Browse files Browse the repository at this point in the history
…nite waiting (#134)

Signed-off-by: Yutong Li <52769999+YutongLi291@users.noreply.github.com>
  • Loading branch information
YutongLi291 authored Aug 7, 2024
1 parent 1f27578 commit 6d4023d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/deadline_test_fixtures/deadline/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import logging
from dataclasses import asdict, dataclass, fields
from enum import Enum
from typing import Any, Callable, Literal, TYPE_CHECKING
from typing import Any, Callable, Literal, TYPE_CHECKING, Optional

from botocore.client import BaseClient

Expand Down Expand Up @@ -579,15 +579,15 @@ def wait_until_complete(
*,
client: DeadlineClient,
wait_interval_sec: int = 10,
max_retries: int | None = None,
max_retries: Optional[int] = 20,
) -> None:
"""
Waits until the job is complete.
This method will refresh the job info until the job is complete or the operation times out.
Args:
wait_interval_sec (int, optional): Interval between waits in seconds. Defaults to 5.
max_retries (int, optional): Maximum retry count. Defaults to None.
max_retries (int, optional): Maximum retry count. Defaults to 20.
"""

def _is_job_complete():
Expand Down

0 comments on commit 6d4023d

Please sign in to comment.