(
stateProvider: IStateProvider,
earlyExit: boolean | undefined
)
| 93 | } |
| 94 | |
| 95 | async function run( |
| 96 | stateProvider: IStateProvider, |
| 97 | earlyExit: boolean | undefined |
| 98 | ): Promise<void> { |
| 99 | await restoreImpl(stateProvider, earlyExit); |
| 100 | |
| 101 | // node will stay alive if any promises are not resolved, |
| 102 | // which is a possibility if HTTP requests are dangling |
| 103 | // due to retries or timeouts. We know that if we got here |
| 104 | // that all promises that we care about have successfully |
| 105 | // resolved, so simply exit with success. |
| 106 | if (earlyExit) { |
| 107 | process.exit(0); |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | export async function restoreOnlyRun( |
| 112 | earlyExit?: boolean | undefined |
no test coverage detected