MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / initScheduler

Function initScheduler

packages/sync/src/scheduler.ts:63–79  ·  view source on GitHub ↗
(options: SchedulerOptions)

Source from the content-addressed store, hash-verified

61}
62
63export function initScheduler(options: SchedulerOptions): void {
64 if (initialized) return
65 initialized = true
66
67 _dsManager = options.dsManager
68 _pullEngine = options.pullEngine
69 _logger = options.logger ?? NOOP_LOGGER
70
71 const sources = _dsManager.loadAll()
72 for (const ds of sources) {
73 if (ds.enabled && ds.sessions.length > 0) {
74 startTimer(ds)
75 }
76 }
77
78 _logger.info(`[Pull] Initialized with ${sources.filter((s) => s.enabled).length} active sources`)
79}
80
81export function stopAllTimers(): void {
82 for (const [id] of timers) {

Callers 2

initApiServerFunction · 0.90
initSyncFunction · 0.90

Calls 3

startTimerFunction · 0.85
infoMethod · 0.65
loadAllMethod · 0.45

Tested by

no test coverage detected