Skip to content

SG-33891 Retries also on 504#316

Merged
carlos-villavicencio-adsk merged 2 commits intomasterfrom
ticket/SG-33891_504
Dec 19, 2023
Merged

SG-33891 Retries also on 504#316
carlos-villavicencio-adsk merged 2 commits intomasterfrom
ticket/SG-33891_504

Conversation

@carlos-villavicencio-adsk
Copy link
Contributor

No description provided.

julien-lang
julien-lang previously approved these changes Dec 18, 2023
# allow for limited retries for those specifically.
if attempt != max_attempts and e.errcode == 502:
LOG.debug("Got a 502 response. Waiting and retrying...")
if attempt != max_attempts and e.errcode in [502, 504]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to use HTTPStatus constants instead: http.HTTPStatus.SERVICE_UNAVAILABLE and http.HTTPStatus.GATEWAY_TIMEOUT

Not a blocker but it's usually better to use constants.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know. However, this would imply a full rewrite of the python-api and we can address that in the future.

Copy link
Member

@julien-lang julien-lang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@NorberMV NorberMV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚢

@carlos-villavicencio-adsk carlos-villavicencio-adsk merged commit 28b5efe into master Dec 19, 2023
@carlos-villavicencio-adsk carlos-villavicencio-adsk deleted the ticket/SG-33891_504 branch December 19, 2023 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants