(label: string, work: () => Promise<unknown>)
| 18 | * @param work - The async work to run in the background. |
| 19 | */ |
| 20 | export function runDetached(label: string, work: () => Promise<unknown>): void { |
| 21 | void Promise.resolve() |
| 22 | .then(work) |
| 23 | .catch((error) => { |
| 24 | logger.error(`Background task failed: ${label}`, toError(error)) |
| 25 | }) |
| 26 | } |
no test coverage detected