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

Function close

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

Source from the content-addressed store, hash-verified

4165 // ------------------------------------------------------------------
4166
4167 const close = () =>
4168 Effect.gen(function* () {
4169 for (const runtime of runtimes.values()) {
4170 if (runtime.plugin.close) {
4171 yield* runtime.plugin
4172 .close()
4173 .pipe(
4174 Effect.mapError((cause) => pluginStorageFailure(runtime.plugin.id, "close", cause)),
4175 );
4176 }
4177 }
4178 if (closeDb) {
4179 const out = closeDb();
4180 if (Effect.isEffect(out)) {
4181 yield* out;
4182 } else if (out instanceof Promise) {
4183 yield* Effect.tryPromise({
4184 try: () => out,
4185 catch: (cause) =>
4186 new StorageError({
4187 message: "Executor database close failed",
4188 cause,
4189 }),
4190 });
4191 }
4192 }
4193 });
4194
4195 const base = {
4196 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