12 lines
245 B
TypeScript
12 lines
245 B
TypeScript
export function runInBackground(
|
|
operation: Promise<unknown>,
|
|
label: string,
|
|
) {
|
|
void operation.catch((error) => {
|
|
console.error(
|
|
`[KOC LOOP] ${label} failed`,
|
|
error instanceof Error ? error.message : error,
|
|
);
|
|
});
|
|
}
|