This commit is contained in:
seb
2026-10-30 05:50:46 +01:00
parent 0303f8121c
commit 1b432cb6c6
5 changed files with 140 additions and 48 deletions

View File

@@ -13,6 +13,7 @@ import { ensureConnection } from '../db/store.js';
import { closeAll as closeAllSse } from './sse.js';
import { closeAllManagers } from '../services/conversationManager.js';
import { shutdownImageCropWorkers } from '../services/imageCrop.js';
import { shutdownImageHashWorkers } from '../services/companyImport/imageHasher.js';
import { shutdownJavascriptSandboxWorkers } from '../services/javascriptSandbox.js';
import { getOrCreateCert } from '../util/cert.js';
import { createLogger } from '../util/logger.js';
@@ -279,6 +280,7 @@ export async function stopApi() {
// Pooled image-crop workers are live threads and must be terminated too, or the
// process stays alive after the last request has been served.
await shutdownImageCropWorkers();
await shutdownImageHashWorkers();
// Same for the pooled sandbox threads that run `javascript_execute` / applets.
await shutdownJavascriptSandboxWorkers();
await stopBackupService();