Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jonespen committed Oct 17, 2023
1 parent cca46a1 commit cfcda4f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ class TaskClient {
while (Date.now() - startingTime < timeOutMs) {
const response = await this.getTask(taskUid)
if (
![TaskStatus.TASK_ENQUEUED, TaskStatus.TASK_PROCESSING].includes(
response.status
)
!([
TaskStatus.TASK_ENQUEUED,
TaskStatus.TASK_PROCESSING,
] as readonly string[]).includes(response.status)
)
return response
await sleep(intervalMs)
Expand Down

0 comments on commit cfcda4f

Please sign in to comment.