MCPcopy
hub / github.com/simstudioai/sim / runDetached

Function runDetached

apps/sim/lib/core/utils/background.ts:20–26  ·  view source on GitHub ↗
(label: string, work: () => Promise<unknown>)

Source from the content-addressed store, hash-verified

18 * @param work - The async work to run in the background.
19 */
20export 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}

Callers 14

background.test.tsFile · 0.90
scheduleForkContentCopyFunction · 0.90
dispatchImportJobFunction · 0.90
dispatchDeleteJobFunction · 0.90
dispatchUpdateJobFunction · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90

Calls 3

toErrorFunction · 0.90
errorMethod · 0.80
resolveMethod · 0.65

Tested by

no test coverage detected