mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-12 06:10:44 +01:00
fix(server): bound plugin refreshes and finish teardown after errors
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
faac1bf85c
commit
d6b27a4b48
8 files changed
+143
-20
No files matched your search
@@ -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");
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user