修复错误

This commit is contained in:
yml2213
2026-07-08 20:41:29 +08:00
parent 487d586492
commit 7b215a66a5
6 changed files with 436 additions and 27 deletions
+2
View File
@@ -1,6 +1,7 @@
import { runDatabaseMigrations } from "../db/migrate.js";
import { ensureAdminUsersBootstrapped } from "../services/admin/admin-auth-service.js";
import { ensureFulfillmentCatalogBootstrapped } from "../services/bootstrap/fulfillment-bootstrap-service.js";
import { startKuaishouIndustrySendCallbackRetryWorker } from "../services/platforms/kuaishou-industry/send-code-service.js";
import { startScheduledJobs } from "../services/scheduler/scheduler-service.js";
import { logError, logInfo } from "../utils/logger.js";
import { formatStartupError, type StartupState } from "./state.js";
@@ -42,6 +43,7 @@ export async function bootstrapCoreServices(
});
startScheduledJobs();
startKuaishouIndustrySendCallbackRetryWorker();
break;
} catch (error) {
const message = formatStartupError(error);
+2
View File
@@ -1,5 +1,6 @@
import type { Server } from "node:http";
import { stopKuaishouIndustrySendCallbackRetryWorker } from "../services/platforms/kuaishou-industry/send-code-service.js";
import { stopScheduledJobs } from "../services/scheduler/scheduler-service.js";
import { logError, logInfo } from "../utils/logger.js";
import type { StartupState } from "./state.js";
@@ -20,6 +21,7 @@ export function createShutdownController(
logInfo("[shutdown]", `received ${signal}, closing HTTP server`);
stopScheduledJobs();
stopKuaishouIndustrySendCallbackRetryWorker();
if (!server.listening) {
return;