Skip to main content

startBackgroundWorkers

API Docs


Function: startBackgroundWorkers()

startBackgroundWorkers(drizzleClient, logger, getMetricsSnapshots?): Promise<void>

Defined in: src/workers/backgroundWorkerService.ts:31

Initializes and starts all background workers, scheduling them to run at their configured intervals.

Parameters

drizzleClient

NodePgDatabase<API Docs>

Drizzle database client

logger

FastifyBaseLogger

Fastify logger instance

getMetricsSnapshots?

(windowMinutes?) => PerfSnapshot[]

Optional function to retrieve performance snapshots for metrics aggregation

Returns

Promise<void>