inject buffer service, implement drain

This commit is contained in:
Alex Holliday committed 2026-06-24 12:17:02 -07:00
1 parent 860b2d6214
commit 5fab2d0a30
3 files changed
+6

No files matched your search

+1
View File
@@ -136,6 +136,7 @@ export const buildWorker = async (shared: SharedServices, envSettings: EnvConfig
monitorsRepository,
checksRepository,
checkService,
bufferService,
checkProducer,
checkEvaluator,
geoCheckPipeline,
+1
View File
@@ -24,6 +24,7 @@ export const initShutdownListener = (server: Server | null, services: ShutdownTa
try {
server?.close();
await services.worker.drain();
await services.worker.shutdown();
await services.db.disconnect();
logger.info({ message: "Graceful shutdown complete" });
@@ -154,6 +154,10 @@ export class JobScheduler implements IJobScheduler {
return { success: true };
};
drain = async () => {
this.stopped = true;
};
shutdown = async () => {
this.stopped = true;
// Stop all timers