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

Function close

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

Source from the content-addressed store, hash-verified

4034 // ------------------------------------------------------------------
4035
4036 const close = () =>
4037 Effect.gen(function* () {
4038 for (const runtime of runtimes.values()) {
4039 if (runtime.plugin.close) {
4040 yield* runtime.plugin
4041 .close()
4042 .pipe(
4043 Effect.mapError((cause) => pluginStorageFailure(runtime.plugin.id, "close", cause)),
4044 );
4045 }
4046 }
4047 if (closeDb) {
4048 const out = closeDb();
4049 if (Effect.isEffect(out)) {
4050 yield* out;
4051 } else if (out instanceof Promise) {
4052 yield* Effect.tryPromise({
4053 try: () => out,
4054 catch: (cause) =>
4055 new StorageError({
4056 message: "Executor database close failed",
4057 cause,
4058 }),
4059 });
4060 }
4061 }
4062 });
4063
4064 const base = {
4065 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