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

Function close

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

Source from the content-addressed store, hash-verified

5664 // ------------------------------------------------------------------
5665
5666 const close = () =>
5667 Effect.gen(function* () {
5668 for (const runtime of runtimes.values()) {
5669 if (runtime.plugin.close) {
5670 yield* runtime.plugin
5671 .close()
5672 .pipe(
5673 Effect.mapError((cause) => pluginStorageFailure(runtime.plugin.id, "close", cause)),
5674 );
5675 }
5676 }
5677 if (closeDb) {
5678 const out = closeDb();
5679 if (Effect.isEffect(out)) {
5680 yield* out;
5681 } else if (out instanceof Promise) {
5682 yield* Effect.tryPromise({
5683 try: () => out,
5684 catch: (cause) =>
5685 new StorageError({
5686 message: "Executor database close failed",
5687 cause,
5688 }),
5689 });
5690 }
5691 }
5692 });
5693
5694 const base = {
5695 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