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

Function close

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

Source from the content-addressed store, hash-verified

4965 // ------------------------------------------------------------------
4966
4967 const close = () =>
4968 Effect.gen(function* () {
4969 for (const runtime of runtimes.values()) {
4970 if (runtime.plugin.close) {
4971 yield* runtime.plugin
4972 .close()
4973 .pipe(
4974 Effect.mapError((cause) => pluginStorageFailure(runtime.plugin.id, "close", cause)),
4975 );
4976 }
4977 }
4978 if (closeDb) {
4979 const out = closeDb();
4980 if (Effect.isEffect(out)) {
4981 yield* out;
4982 } else if (out instanceof Promise) {
4983 yield* Effect.tryPromise({
4984 try: () => out,
4985 catch: (cause) =>
4986 new StorageError({
4987 message: "Executor database close failed",
4988 cause,
4989 }),
4990 });
4991 }
4992 }
4993 });
4994
4995 const base = {
4996 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