feat(03-04): wire startOutboxWorker into index.ts at boot
- Import startOutboxWorker beside startBrokerPoller import - Call startOutboxWorker() immediately after startBrokerPoller() - Worker drains D-05 outbox every 15s alongside the 5-min ctag poller
This commit is contained in:
@@ -8,6 +8,7 @@ import { sseRouter } from './routes/sse.js'
|
||||
import { oidcAuthMiddleware, processOAuthCallback } from './auth/middleware.js'
|
||||
import { devAuthBypass } from './auth/devBypass.js'
|
||||
import { startBrokerPoller } from './broker/poller.js'
|
||||
import { startOutboxWorker } from './broker/outboxWorker.js'
|
||||
|
||||
export const app = new Hono()
|
||||
|
||||
@@ -52,6 +53,8 @@ app.route('/api/sse', sseRouter)
|
||||
// Start the CalDAV broker poller (5-min cron, D-13 ctag change-detection)
|
||||
// Runs in the background — errors are caught and logged per-credential (T-03-04)
|
||||
startBrokerPoller()
|
||||
// Drain the D-05 outbox every 15s: dispatches pending CalDAV writes to Fastmail
|
||||
startOutboxWorker()
|
||||
|
||||
// Serve React PWA static assets from ./public (Vite build output)
|
||||
app.use('/assets/*', serveStatic({ root: './public' }))
|
||||
|
||||
Reference in New Issue
Block a user