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

Function close

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

Source from the content-addressed store, hash-verified

5383 // ------------------------------------------------------------------
5384
5385 const close = () =>
5386 Effect.gen(function* () {
5387 for (const runtime of runtimes.values()) {
5388 if (runtime.plugin.close) {
5389 yield* runtime.plugin
5390 .close()
5391 .pipe(
5392 Effect.mapError((cause) => pluginStorageFailure(runtime.plugin.id, "close", cause)),
5393 );
5394 }
5395 }
5396 if (closeDb) {
5397 const out = closeDb();
5398 if (Effect.isEffect(out)) {
5399 yield* out;
5400 } else if (out instanceof Promise) {
5401 yield* Effect.tryPromise({
5402 try: () => out,
5403 catch: (cause) =>
5404 new StorageError({
5405 message: "Executor database close failed",
5406 cause,
5407 }),
5408 });
5409 }
5410 }
5411 });
5412
5413 const base = {
5414 integrations: {

Callers 6

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

Calls 3

pluginStorageFailureFunction · 0.85
valuesMethod · 0.80
closeMethod · 0.65

Tested by

no test coverage detected