concurrent.futures deletion fix #78
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#77
Per submitted issue, making the api_name unique through combination of datetime and random number will significantly reduce the chances of collision (aka same api_name)
Problem: When you utilize concurrent.futures as part of POC from #6 , the delete_gateway behavior will delete all ApiGateways with matching api_name. The api_name is just the site name and appended " - IP Rotate API" label. If you create multiple ApiGateways to same site, the delete behavior deletes all ApiGateways as they would all have the same api_name.
I do not believe having the same api_name causes issues when creating new ApiGateways as I believe I've seen multiple ApiGateways when viewing in AWS console. The deletion is the only issue.
Solution: By appending a datetime and random number from 0 to 99999, any collisions from matching api names should all but be eliminated (If you created 25 ApiGateway at the exact same second, the odds of any matching API names is 0.3%. Pair that with the odds that all 25 Gateways would be created at the exact same second, the odds get even lower of collision.