MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / close

Function close

packages/core/sdk/src/executor.ts:6401–6427  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6399 // ------------------------------------------------------------------
6400
6401 const close = () =>
6402 Effect.gen(function* () {
6403 for (const runtime of runtimes.values()) {
6404 if (runtime.plugin.close) {
6405 yield* runtime.plugin
6406 .close()
6407 .pipe(
6408 Effect.mapError((cause) => pluginStorageFailure(runtime.plugin.id, "close", cause)),
6409 );
6410 }
6411 }
6412 if (closeDb) {
6413 const out = closeDb();
6414 if (Effect.isEffect(out)) {
6415 yield* out;
6416 } else if (out instanceof Promise) {
6417 yield* Effect.tryPromise({
6418 try: () => out,
6419 catch: (cause) =>
6420 new StorageError({
6421 message: "Executor database close failed",
6422 cause,
6423 }),
6424 });
6425 }
6426 }
6427 });
6428
6429 const base = {
6430 integrations: {

Callers 5

CommandPaletteFunction · 0.50
handleSubmitFunction · 0.50
handleOAuthConnectFunction · 0.50
handleCimdConnectFunction · 0.50
AddAccountModalViewFunction · 0.50

Calls 3

pluginStorageFailureFunction · 0.85
valuesMethod · 0.80
closeMethod · 0.65

Tested by

no test coverage detected