Skip to content

Commit 3516045

Browse files
committed
Revert "Make restarts and rollouts sync instead of async"
This reverts commit 71edc44.
1 parent 7928275 commit 3516045

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

routes/images.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ router.post("/:images/restart", async function (request, response, next) {
3434

3535
// Note: This approach initiates the recreate process in the background after responding to the request.
3636
// It does not handle concurrency control for multiple overlapping requests.
37-
for(const deploymentInfo of filteredDeployments){
37+
filteredDeployments.forEach(async (deploymentInfo) => {
3838
const [deploymentName] = deploymentInfo.split(" ");
3939
try {
4040
await deployment.restart(deploymentName);
4141
debug("Deployment restarted => %s", deploymentName);
4242
} catch (error) {
4343
debug("Error during restart of %s => %s", deploymentName, error.message);
4444
}
45-
}
45+
});
4646
});
4747

4848
// Rollout all deployments that run a specific image
@@ -75,15 +75,15 @@ router.post("/:images/rollout", async function (request, response, next) {
7575

7676
// Note: This approach initiates the rollout process in the background after responding to the request.
7777
// It does not handle concurrency control for multiple overlapping requests.
78-
for(const deploymentInfo of filteredDeployments){
78+
filteredDeployments.forEach(async (deploymentInfo) => {
7979
const [deploymentName] = deploymentInfo.split(" ");
8080
try {
8181
await deployment.rollout(deploymentName);
8282
debug("Deployment rolled out => %s", deploymentName);
8383
} catch (error) {
8484
debug("Error during rollout of %s => %s", deploymentName, error.message);
8585
}
86-
}
86+
});
8787
});
8888

8989
module.exports = router;

0 commit comments

Comments
 (0)