MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / close

Method close

apps/api/src/queues/queue-manager.ts:209–238  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

207 }
208
209 async close(): Promise<void> {
210 logger.info("Closing queues + workers", {
211 event: "queues.shutdown.started",
212 });
213
214 const tasks: Promise<void>[] = [
215 this.accountMaintenanceWorker.close(),
216 this.accountMaintenanceQueue.close(),
217 this.emailDeliveryWorker.close(),
218 this.emailDeliveryQueue.close(),
219 this.notificationDispatchWorker.close(),
220 this.notificationDispatchQueue.close(),
221 this.notificationMaintenanceWorker.close(),
222 this.notificationMaintenanceQueue.close(),
223 ];
224
225 if (this.webPushDeliveryWorker !== null) {
226 tasks.push(this.webPushDeliveryWorker.close());
227 }
228
229 if (this.webPushDeliveryQueue !== null) {
230 tasks.push(this.webPushDeliveryQueue.close());
231 }
232
233 await Promise.all(tasks);
234
235 logger.info("Queues + workers closed", {
236 event: "queues.shutdown.completed",
237 });
238 }
239}

Callers 8

startServerFunction · 0.45
gracefulShutdownFunction · 0.45
valkey.test.tsFile · 0.45
memory.test.tsFile · 0.45
noop.test.tsFile · 0.45

Calls 1

infoMethod · 0.80

Tested by

no test coverage detected