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:
Andrew Eisenberg
2023-02-13 13:26:01 -08:00
parent e187d074ed
commit a2487fb969
6 changed files with 43 additions and 16 deletions

View File

@@ -463,7 +463,9 @@ export async function waitForProcessing(
util.assertNever(status);
}
await util.delay(STATUS_CHECK_FREQUENCY_MILLISECONDS);
await util.delay(STATUS_CHECK_FREQUENCY_MILLISECONDS, {
allowProcessExit: false,
});
}
} finally {
logger.endGroup();