geoadmin / tool-aws

A set of generic utility tools to manage some aws services
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Infinite loop when deleting files from a bucket beeing used #7

Closed procrastinatio closed 7 years ago

procrastinatio commented 7 years ago

Case: Someone is using mapproxy on a given layer. Tiles are constantly generated.

The s3rm script is deleting the files as soon as they are generated, never ending.

loicgasser commented 7 years ago

s3rm doesn't stop as long as tiles with a matching path are still found in the bucket.

loicgasser commented 7 years ago

I could avoid this behaviour I think. If we get two times in row less than the maximal number of entries, we can deduce that somebody is adding new entries at the same time. I will propose a PR that nobody will ever review and that I will self merge.

gjn commented 7 years ago

Why, we have 6 people in our team- we have Andrea as well.

Please talk to each other regarding reviews.

danduk82 commented 7 years ago

I don't think this risk exist, as the code gets the list of keys once, and then delete the keys that it has received once. There is no while True on key listing...

gjn commented 7 years ago

I think we can close this, no?

loicgasser commented 7 years ago

Yep