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

Function close

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

Source from the content-addressed store, hash-verified

7147 // ------------------------------------------------------------------
7148
7149 const close = () =>
7150 Effect.gen(function* () {
7151 for (const runtime of runtimes.values()) {
7152 if (runtime.plugin.close) {
7153 yield* runtime.plugin
7154 .close()
7155 .pipe(
7156 Effect.mapError((cause) => pluginStorageFailure(runtime.plugin.id, "close", cause)),
7157 );
7158 }
7159 }
7160 if (closeDb) {
7161 const out = closeDb();
7162 if (Effect.isEffect(out)) {
7163 yield* out;
7164 } else if (out instanceof Promise) {
7165 yield* Effect.tryPromise({
7166 try: () => out,
7167 catch: (cause) =>
7168 new StorageError({
7169 message: "Executor database close failed",
7170 cause,
7171 }),
7172 });
7173 }
7174 }
7175 });
7176
7177 const base = {
7178 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