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

Function close

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

Source from the content-addressed store, hash-verified

3778 // ------------------------------------------------------------------
3779
3780 const close = () =>
3781 Effect.gen(function* () {
3782 for (const runtime of runtimes.values()) {
3783 if (runtime.plugin.close) {
3784 yield* runtime.plugin
3785 .close()
3786 .pipe(
3787 Effect.mapError((cause) => pluginStorageFailure(runtime.plugin.id, "close", cause)),
3788 );
3789 }
3790 }
3791 if (closeDb) {
3792 const out = closeDb();
3793 if (Effect.isEffect(out)) {
3794 yield* out;
3795 } else if (out instanceof Promise) {
3796 yield* Effect.tryPromise({
3797 try: () => out,
3798 catch: (cause) =>
3799 new StorageError({
3800 message: "Executor database close failed",
3801 cause,
3802 }),
3803 });
3804 }
3805 }
3806 });
3807
3808 const base = {
3809 integrations: {

Callers

nothing calls this directly

Calls 3

pluginStorageFailureFunction · 0.85
valuesMethod · 0.80
closeMethod · 0.65

Tested by

no test coverage detected