mirror of
https://github.com/nick-fields/retry.git
synced 2026-02-10 07:05:29 +00:00
* minor: refactor to make testing easier * patch: retrieve inputs into object rather than globals * test: run more "integration" tests in parallel * test: fix needs and rearrange ci_integration_* jobs * test: forgot comma * test: fix sad_path_timeout_minutes assertions * test: add single ci_all_tests_passed job that can be required for CI rather than each individual job * test: add single ci_all_tests_passed job that can be required for CI rather than each individual job
13 lines
356 B
TypeScript
13 lines
356 B
TypeScript
import { debug } from '@actions/core';
|
|
|
|
export async function wait(ms: number) {
|
|
return new Promise((r) => setTimeout(r, ms));
|
|
}
|
|
|
|
export async function retryWait(retryWaitSeconds: number) {
|
|
const waitStart = Date.now();
|
|
await wait(retryWaitSeconds);
|
|
debug(`Waited ${Date.now() - waitStart}ms`);
|
|
debug(`Configured wait: ${retryWaitSeconds}ms`);
|
|
}
|