-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
56 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: tmp-configtest | ||
name: lift | ||
region: us-east-1 | ||
|
||
s3: | ||
|
@@ -8,4 +8,4 @@ s3: | |
|
||
#db: | ||
|
||
static-website: | ||
#static-website: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
service: tmp-configtest-app | ||
service: lift-app | ||
|
||
provider: | ||
name: aws | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
export async function wait(delay: number) { | ||
return new Promise(resolve => setTimeout(resolve, delay)); | ||
} | ||
|
||
export async function waitFor(callback: () => Promise<boolean>, maxAttempts = 120, delay = 3000) { | ||
let attempts = 0; | ||
while (attempts < maxAttempts) { | ||
const result = await callback(); | ||
if (result) { | ||
return; | ||
} | ||
attempts++; | ||
await wait(delay) | ||
} | ||
throw new Error('Waited for too long, something is up!') | ||
} |