Sleep earlier

This commit is contained in:
shati-patel
2022-01-19 17:25:30 +00:00
committed by Shati Patel
parent 8aaa2492f2
commit 8e20d01b4e

View File

@@ -29,10 +29,9 @@ export class RemoteQueriesMonitor {
let attemptCount = 0;
// Wait a bit before starting to monitor the workflow run.
await this.sleep(RemoteQueriesMonitor.sleepTime);
while (attemptCount <= RemoteQueriesMonitor.maxAttemptCount) {
await this.sleep(RemoteQueriesMonitor.sleepTime);
if (cancellationToken && cancellationToken.isCancellationRequested) {
return { status: 'Cancelled' };
}
@@ -47,7 +46,6 @@ export class RemoteQueriesMonitor {
return workflowStatus;
}
await this.sleep(RemoteQueriesMonitor.sleepTime);
attemptCount++;
}