Open maxpearl opened 3 years ago
Also, automation.py returns True
or False
, not the url of the mirror. Probably automation.py is the place to put the different processes.
Upon more detailed look at this code - this is not the issue. The issue is waiting for the disabling before the deletion - that's what's taking the time. The new distribution info is returned immediately in the new distribution step.
So the place to put the separate process is in aws_functions - just spin of a process to disable, wait and delete.
The automated replace function for cloudfront (and likely other services) takes far too long for flask - the page load will time out before the waiter for the distribution is complete. The waiter works, and the new distribution is created, but it's not getting the info on the new URL back to flask.
Probably the best strategy is to split off a separate process that will wait, then populate github and database with new URL, and have the main process simply go back with a flashed message about "new distribution creation is in process" or some such.