Skip to content

Commit

Permalink
new: Add support for max_retries per capture
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Nov 6, 2024
1 parent 221ee51 commit eb03797
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pylacus/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class CaptureSettings(TypedDict, total=False):
force: bool | None
recapture_interval: int | None
priority: int | None
max_retries: int | None
uuid: str | None

depth: int
Expand Down Expand Up @@ -155,6 +156,7 @@ def enqueue(self, *,
force: bool=False,
recapture_interval: int=300,
priority: int=0,
max_retries: int | None=None,
uuid: str | None=None,
) -> str:
...
Expand Down Expand Up @@ -184,6 +186,7 @@ def enqueue(self, *,
force: bool=False,
recapture_interval: int=300,
priority: int=0,
max_retries: int | None=None,
uuid: str | None=None,
) -> str:
'''Submit a new capture. Pass a typed dictionary or any of the relevant settings, get the UUID.'''
Expand Down Expand Up @@ -228,6 +231,8 @@ def enqueue(self, *,
to_enqueue['viewport'] = viewport
if referer:
to_enqueue['referer'] = referer
if max_retries is not None:
to_enqueue['max_retries'] = max_retries
if uuid:
to_enqueue['uuid'] = uuid

Expand Down

0 comments on commit eb03797

Please sign in to comment.