Skip to content

Commit

Permalink
fix(waiter): Increase timeout to 2hr and wait in parallel (#231)
Browse files Browse the repository at this point in the history
Increase timeout to 2hr and wait in parallel
  • Loading branch information
mdial89f authored Apr 20, 2023
1 parent 4af5678 commit ca228db
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/serverless-stage-destroyer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@ export class ServerlessStageDestroyer {

// Fifth, wait for stacks to be deleted.
if (wait) {
let waiters = [];
for (let i of stacksToDestroy || []) {
await this.ensureStackIsDeleted(region, `${i.StackName}`);
waiters.push(this.ensureStackIsDeleted(region, `${i.StackName}`));
}
await Promise.all(waiters);
}
}

Expand Down Expand Up @@ -101,7 +103,7 @@ export class ServerlessStageDestroyer {
await waitUntilStackDeleteComplete(
{
client: client,
maxWaitTime: 1500,
maxWaitTime: 7200,
},
{
StackName: stack,
Expand Down

0 comments on commit ca228db

Please sign in to comment.