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

Function close

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

Source from the content-addressed store, hash-verified

7239 // ------------------------------------------------------------------
7240
7241 const close = () =>
7242 Effect.gen(function* () {
7243 for (const runtime of runtimes.values()) {
7244 if (runtime.plugin.close) {
7245 yield* runtime.plugin
7246 .close()
7247 .pipe(
7248 Effect.mapError((cause) => pluginStorageFailure(runtime.plugin.id, "close", cause)),
7249 );
7250 }
7251 }
7252 if (closeDb) {
7253 const out = closeDb();
7254 if (Effect.isEffect(out)) {
7255 yield* out;
7256 } else if (out instanceof Promise) {
7257 yield* Effect.tryPromise({
7258 try: () => out,
7259 catch: (cause) =>
7260 new StorageError({
7261 message: "Executor database close failed",
7262 cause,
7263 }),
7264 });
7265 }
7266 }
7267 });
7268
7269 const base = {
7270 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