MCPcopy
hub / github.com/Doorman11991/smallcode / runShutdown

Method runShutdown

src/plugins/loader.js:309–317  ·  view source on GitHub ↗
(context = {})

Source from the content-addressed store, hash-verified

307
308 // Run all plugin shutdown handlers. Called on exit for cleanup.
309 async runShutdown(context = {}) {
310 for (const { handler, plugin } of this.shutdownHandlers) {
311 try {
312 await handler(context);
313 } catch (e) {
314 console.error(`[plugin:${plugin}] shutdown failed: ${e.message}`);
315 }
316 }
317 }
318
319 // Execute hooks for a given event. Returns array of results from non-void handlers.
320 async runHooks(event, data = {}) {

Callers 1

mainFunction · 0.80

Calls 1

errorMethod · 0.45

Tested by

no test coverage detected