Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add default max_retries to Job.wait_until_complete to avoid infinite waiting #134

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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