[Optmization] Optimize run of ECS stack updater in data.all prod
Is your idea related to a problem? Please describe. Currently, the way ECS stack updater works is, it starts updating "environments" one by one , waiting for an environment to complete updating before starting the next one. Once all the environments are updated, then datasets are updated asynchronously
Since the ECS task has to wait for environment update to complete and waits for each environment this increases the runtime of this ECS task to hours and as the number of environments go up then this can keep running overnight.
Describe the solution you'd like
Since for updating the datasets, their environment have to be updated first, an environment and its datasets can be bundled and started in a thread . This way simultaneous updates can occur and save a lot of time.
P.S. Don't attach files. Please, prefer add code snippets directly in the message body.