Avoid unref-ing timer while awaiting status upload
We had a problem where `waitForProcessing` was not completing before the node process ends. This is because using `unref` would allow the node process to end without having the `delay` function complete.
This commit is contained in:
parent
e187d074ed
commit
a2487fb969
6 changed files with 43 additions and 16 deletions
4
lib/upload-lib.js
generated
4
lib/upload-lib.js
generated
|
|
@ -330,7 +330,9 @@ async function waitForProcessing(repositoryNwo, sarifID, logger, options = {
|
|||
else {
|
||||
util.assertNever(status);
|
||||
}
|
||||
await util.delay(STATUS_CHECK_FREQUENCY_MILLISECONDS);
|
||||
await util.delay(STATUS_CHECK_FREQUENCY_MILLISECONDS, {
|
||||
allowProcessExit: false,
|
||||
});
|
||||
}
|
||||
}
|
||||
finally {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue