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

Function close

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

Source from the content-addressed store, hash-verified

4851 // ------------------------------------------------------------------
4852
4853 const close = () =>
4854 Effect.gen(function* () {
4855 for (const runtime of runtimes.values()) {
4856 if (runtime.plugin.close) {
4857 yield* runtime.plugin
4858 .close()
4859 .pipe(
4860 Effect.mapError((cause) => pluginStorageFailure(runtime.plugin.id, "close", cause)),
4861 );
4862 }
4863 }
4864 if (closeDb) {
4865 const out = closeDb();
4866 if (Effect.isEffect(out)) {
4867 yield* out;
4868 } else if (out instanceof Promise) {
4869 yield* Effect.tryPromise({
4870 try: () => out,
4871 catch: (cause) =>
4872 new StorageError({
4873 message: "Executor database close failed",
4874 cause,
4875 }),
4876 });
4877 }
4878 }
4879 });
4880
4881 const base = {
4882 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