Skip to content

Commit

Permalink
add sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
zzh8829 committed Apr 26, 2022
1 parent 45f380a commit 3e359f0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import {
getSdk
} from './generated/graphql'

const sleep = async (ms: number): Promise<void> =>
new Promise(resolve => setTimeout(resolve, ms))

async function run(): Promise<void> {
try {
const endpoint =
Expand Down Expand Up @@ -99,7 +102,7 @@ async function run(): Promise<void> {
result.currentUser?.deployment?.status ===
DeploymentStatus.DeployInProgress
) {
core.info('project deploying')
core.info('project deploying...')
} else if (
result.currentUser?.deployment?.status ===
DeploymentStatus.DeploySucceeded ||
Expand All @@ -120,6 +123,8 @@ async function run(): Promise<void> {
)
done = true
}

await sleep(2000)
}
}

Expand Down

0 comments on commit 3e359f0

Please sign in to comment.