Retry Settings

Retry settings that are applied to tasks in case of failure

class qarnot.retry_settings.RetrySettings(maxTotalRetries: Optional[int] = None, maxPerInstanceRetries: Optional[int] = None)[source]

Bases: object

Represents task retry settings.

__init__(maxTotalRetries: Optional[int] = None, maxPerInstanceRetries: Optional[int] = None)[source]

Create a new RetrySettings.

If neither maxTotalRetries nor maxPerInstanceRetries are set (or if they are equal to 0), the instances will not retry. If both maxTotalRetries and maxPerInstanceRetries are set, then the most restrictive applies.

  • maxTotalRetries (int | None) – Maximum total number of retries for the whole task. Default to None.

  • maxPerInstanceRetries (int | None) – Maximum number of retries for each task instance. Default to None.

classmethod from_json(json: Dict[str, int])[source]

Create the retry settings from json.


json (dict) – Dictionary representing the retry settings


The created RetrySettings

to_json() Dict[str, Optional[int]][source]

Get a dict ready to be json packed.


the json elements of the class.

Return type