u
This commit is contained in:
@@ -12,6 +12,7 @@ import { authMiddleware } from './middleware/auth.js';
|
||||
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 { getOrCreateCert } from '../util/cert.js';
|
||||
import v1Router from '../v1/index.js';
|
||||
|
||||
@@ -192,6 +193,9 @@ export async function stopApi() {
|
||||
// forever — node --watch hangs on "Waiting for graceful termination...".
|
||||
closeAllSse();
|
||||
closeAllManagers();
|
||||
// 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();
|
||||
const closers = [];
|
||||
if (server) {
|
||||
const s = server;
|
||||
|
||||
Reference in New Issue
Block a user