fix(server): bound plugin refreshes and finish teardown after errors

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-10-24 23:50:36 -05:00
1 parent faac1bf85c
commit d6b27a4b48
8 files changed
+143 -20

No files matched your search

+2 -5
View File
@@ -1,3 +1,4 @@
import { finishServiceShutdown } from "../shutdown.js";
/**
* PluginLoader — discovery, installation, and runtime activation of plugins.
*
@@ -2143,11 +2144,7 @@ export function pluginLoader(
const { workerManager, jobScheduler } = runtimeServices;
// 1. Stop the job scheduler tick loop
await jobScheduler.stop();
// 2. Stop all worker processes
await workerManager.stopAll();
await finishServiceShutdown(() => jobScheduler.stop(), () => workerManager.stopAll());
log.info("plugin-loader: all plugins shut down");
},