Move the delay to the end of the loop.
This commit is contained in:
parent
4eef7ef32c
commit
215c4f5ff5
3 changed files with 3 additions and 5 deletions
3
lib/upload-lib.js
generated
3
lib/upload-lib.js
generated
|
|
@ -291,8 +291,6 @@ async function waitForProcessing(repositoryNwo, sarifID, apiDetails, logger) {
|
|||
logger.warning("Timed out waiting for analysis to finish processing. Continuing.");
|
||||
break;
|
||||
}
|
||||
// We put the delay at the start of the loop, since it's unlikely that the analysis will have succeeded immediately. We might as well wait preemptively.
|
||||
await util.delay(STATUS_CHECK_FREQUENCY_MILLISECONDS);
|
||||
try {
|
||||
const response = await client.request("GET /repos/:owner/:repo/code-scanning/sarifs/:sarif_id", {
|
||||
owner: repositoryNwo.owner,
|
||||
|
|
@ -322,6 +320,7 @@ async function waitForProcessing(repositoryNwo, sarifID, apiDetails, logger) {
|
|||
throw e;
|
||||
}
|
||||
}
|
||||
await util.delay(STATUS_CHECK_FREQUENCY_MILLISECONDS);
|
||||
}
|
||||
logger.endGroup();
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -443,8 +443,6 @@ export async function waitForProcessing(
|
|||
);
|
||||
break;
|
||||
}
|
||||
// We put the delay at the start of the loop, since it's unlikely that the analysis will have succeeded immediately. We might as well wait preemptively.
|
||||
await util.delay(STATUS_CHECK_FREQUENCY_MILLISECONDS);
|
||||
try {
|
||||
const response = await client.request(
|
||||
"GET /repos/:owner/:repo/code-scanning/sarifs/:sarif_id",
|
||||
|
|
@ -476,6 +474,7 @@ export async function waitForProcessing(
|
|||
throw e;
|
||||
}
|
||||
}
|
||||
await util.delay(STATUS_CHECK_FREQUENCY_MILLISECONDS);
|
||||
}
|
||||
logger.endGroup();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue