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

Function close

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

Source from the content-addressed store, hash-verified

4764 // ------------------------------------------------------------------
4765
4766 const close = () =>
4767 Effect.gen(function* () {
4768 for (const runtime of runtimes.values()) {
4769 if (runtime.plugin.close) {
4770 yield* runtime.plugin
4771 .close()
4772 .pipe(
4773 Effect.mapError((cause) => pluginStorageFailure(runtime.plugin.id, "close", cause)),
4774 );
4775 }
4776 }
4777 if (closeDb) {
4778 const out = closeDb();
4779 if (Effect.isEffect(out)) {
4780 yield* out;
4781 } else if (out instanceof Promise) {
4782 yield* Effect.tryPromise({
4783 try: () => out,
4784 catch: (cause) =>
4785 new StorageError({
4786 message: "Executor database close failed",
4787 cause,
4788 }),
4789 });
4790 }
4791 }
4792 });
4793
4794 const base = {
4795 integrations: {

Callers 6

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

Calls 3

pluginStorageFailureFunction · 0.85
valuesMethod · 0.80
closeMethod · 0.65

Tested by

no test coverage detected