u
This commit is contained in:
@@ -19,6 +19,7 @@ import { createLogger } from '../util/logger.js';
|
||||
import v1Router from '../v1/index.js';
|
||||
import { startBackendMonitor, stopBackendMonitor, isDevMode } from '../backendmonitor/server.js';
|
||||
import { startBackupService, stopBackupService } from '../services/backupService.js';
|
||||
import { startHealthMonitorService, stopHealthMonitorService } from '../services/healthMonitorService.js';
|
||||
|
||||
const apiLog = createLogger('api');
|
||||
|
||||
@@ -252,6 +253,12 @@ export async function startApi() {
|
||||
apiLog.error('Failed to start Backup Service:', err.message);
|
||||
}
|
||||
|
||||
try {
|
||||
startHealthMonitorService();
|
||||
} catch (err) {
|
||||
apiLog.error('Failed to start Health Monitor Service:', err.message);
|
||||
}
|
||||
|
||||
return server;
|
||||
})();
|
||||
|
||||
@@ -275,6 +282,7 @@ export async function stopApi() {
|
||||
// Same for the pooled sandbox threads that run `javascript_execute` / applets.
|
||||
await shutdownJavascriptSandboxWorkers();
|
||||
await stopBackupService();
|
||||
await stopHealthMonitorService();
|
||||
const closers = [];
|
||||
if (server) {
|
||||
const s = server;
|
||||
|
||||
Reference in New Issue
Block a user