Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #177 from unity-sds/171-scale-worker-nodes
Browse files Browse the repository at this point in the history
Hot-fix: Add backoff/retry when requesting job status by id
  • Loading branch information
drewm-jpl authored Apr 10, 2023
2 parents a09f574 + cdc7539 commit d967f6b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion unity-test/step_defs/test_get_processing_status.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from pytest_bdd import scenario, given, when, then, parsers
from pytest_bdd import scenario, given, when, then
import backoff
import requests

from .conftest import FEATURES_DIR, _request_job_status_by_id

Expand All @@ -23,6 +25,13 @@ def created_response(response):
"a WPS-T request is made to get the status of the job by its ID",
target_fixture="response",
)
@backoff.on_exception(
backoff.constant,
(requests.exceptions.HTTPError),
max_time=3600,
jitter=None,
interval=1,
)
def request_job_status_by_id(process_service_endpoint, project_process_dict, job_id):
return _request_job_status_by_id(
process_service_endpoint,
Expand Down

0 comments on commit d967f6b

Please sign in to comment.