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

Function close

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

Source from the content-addressed store, hash-verified

4877 // ------------------------------------------------------------------
4878
4879 const close = () =>
4880 Effect.gen(function* () {
4881 for (const runtime of runtimes.values()) {
4882 if (runtime.plugin.close) {
4883 yield* runtime.plugin
4884 .close()
4885 .pipe(
4886 Effect.mapError((cause) => pluginStorageFailure(runtime.plugin.id, "close", cause)),
4887 );
4888 }
4889 }
4890 if (closeDb) {
4891 const out = closeDb();
4892 if (Effect.isEffect(out)) {
4893 yield* out;
4894 } else if (out instanceof Promise) {
4895 yield* Effect.tryPromise({
4896 try: () => out,
4897 catch: (cause) =>
4898 new StorageError({
4899 message: "Executor database close failed",
4900 cause,
4901 }),
4902 });
4903 }
4904 }
4905 });
4906
4907 const base = {
4908 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