INNER CODE UNIT · TypeScript

shutdown

eclaire-labs/eclaire · apps/backend/src/index.ts:319

const shutdown = async (signal: string) => {
  logger.info(
    { signal, SERVICE_ROLE, QUEUE_BACKEND },
    "Shutdown signal received. Shutting down gracefully...",
  );

  try {
    // Stop channel adapters first
    await channelRegistry.stopAll();
    logger.info("Channel adapters stopped");
  } catch (error) {
    logger.error({ error }, "Error stopping channel adapters");
  }

  // Stop scheduler if running (all mode)
  if (SERVICE_ROLE === "all") {
    try {
      await stopScheduler();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…