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

Function close

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

Source from the content-addressed store, hash-verified

7002 // ------------------------------------------------------------------
7003
7004 const close = () =>
7005 Effect.gen(function* () {
7006 for (const runtime of runtimes.values()) {
7007 if (runtime.plugin.close) {
7008 yield* runtime.plugin
7009 .close()
7010 .pipe(
7011 Effect.mapError((cause) => pluginStorageFailure(runtime.plugin.id, "close", cause)),
7012 );
7013 }
7014 }
7015 if (closeDb) {
7016 const out = closeDb();
7017 if (Effect.isEffect(out)) {
7018 yield* out;
7019 } else if (out instanceof Promise) {
7020 yield* Effect.tryPromise({
7021 try: () => out,
7022 catch: (cause) =>
7023 new StorageError({
7024 message: "Executor database close failed",
7025 cause,
7026 }),
7027 });
7028 }
7029 }
7030 });
7031
7032 const base = {
7033 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