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

Function close

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

Source from the content-addressed store, hash-verified

6489 // ------------------------------------------------------------------
6490
6491 const close = () =>
6492 Effect.gen(function* () {
6493 for (const runtime of runtimes.values()) {
6494 if (runtime.plugin.close) {
6495 yield* runtime.plugin
6496 .close()
6497 .pipe(
6498 Effect.mapError((cause) => pluginStorageFailure(runtime.plugin.id, "close", cause)),
6499 );
6500 }
6501 }
6502 if (closeDb) {
6503 const out = closeDb();
6504 if (Effect.isEffect(out)) {
6505 yield* out;
6506 } else if (out instanceof Promise) {
6507 yield* Effect.tryPromise({
6508 try: () => out,
6509 catch: (cause) =>
6510 new StorageError({
6511 message: "Executor database close failed",
6512 cause,
6513 }),
6514 });
6515 }
6516 }
6517 });
6518
6519 const base = {
6520 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