Skip to content

Conversation

@nathanthorpe
Copy link
Contributor

@nathanthorpe nathanthorpe commented Apr 19, 2023

Add delay when retrying upload and make the retry count configurable

Copy link
Contributor

@sminot sminot left a comment

Choose a reason for hiding this comment

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

Looks great -- let's just be sure to document the pausing behavior appropriately


You can set the `base_url` property in the config file rather than using the environment variable.

The `transfer_max_retries` configuration property specifies the maximum number of times to attempt uploading a file to Cirro in the event of a transfer failure.
Copy link
Contributor

Choose a reason for hiding this comment

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

Add text:

After each failed upload attempt there will be a 1-2 minute pause before retrying the upload.

except S3UploadFailedError as e:

except (S3UploadFailedError, ConnectionError) as e:
delay = random.uniform(0, 60) + retry * 60
Copy link
Contributor

Choose a reason for hiding this comment

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

So each retry takes longer and longer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah it adds about a minute to each retry

@nathanthorpe nathanthorpe merged commit 7239c83 into main Apr 19, 2023
@nathanthorpe nathanthorpe deleted the catch_timeout branch April 19, 2023 19:16
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.

4 participants