Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write to multiple buckets. #356

Merged
merged 3 commits into from
Nov 12, 2018

Conversation

zerebubuth
Copy link
Member

By configuring the store bucket name as a list, this adds the ability to write to that list of buckets in order.

Connects to #353.

By configuring the store bucket name as a list, this adds the ability to write to that list of buckets in order.

# if buckets are given as a list, then write to each of them and read from
# the last one. this behaviour is captures in MultiStore.
if isinstance(bucket_name, list):
Copy link
Member

Choose a reason for hiding this comment

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

It might be good to make sure we still have a test that covers the single-string bucket case. I've been bitten a couple times before by the fact that Python considers a string an iterable and it acts as a list of characters. Your isinstance(bucket_name, list) check here will protect against that, but I could see it inadvertently getting streamlined into a iterable-ness check in the future.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point - added test for that in 078c26a.

delete_retry_interval, logger, object_acl, tags, tile_key_gen)

# if buckets are given as a list, then write to each of them and read from
# the last one. this behaviour is captures in MultiStore.
Copy link
Member

Choose a reason for hiding this comment

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

nit: captured

Copy link
Member Author

Choose a reason for hiding this comment

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

Well spotted! Fixed in d3f8277.

@zerebubuth zerebubuth merged commit a118c29 into master Nov 12, 2018
@zerebubuth zerebubuth deleted the zerebubuth/353-write-to-multiple-s3-buckets branch November 12, 2018 16:46
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