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

Function integrationSetHealthCheck

packages/core/sdk/src/executor.ts:2849–2860  ·  view source on GitHub ↗
(
      slug: IntegrationSlug,
      spec: HealthCheckSpec | null,
    )

Source from the content-addressed store, hash-verified

2847 // No plugin hook, no config read-modify-write, nothing a plugin's own
2848 // config cycle can clobber.
2849 const integrationSetHealthCheck = (
2850 slug: IntegrationSlug,
2851 spec: HealthCheckSpec | null,
2852 ): Effect.Effect<void, IntegrationNotFoundError | StorageFailure> =>
2853 Effect.gen(function* () {
2854 const row = yield* findIntegrationRow(slug);
2855 if (!row) return yield* new IntegrationNotFoundError({ slug });
2856 yield* core.updateMany("integration", {
2857 where: (b: AnyCb) => b("slug", "=", String(slug)),
2858 set: { health_check: spec, updated_at: new Date() },
2859 });
2860 });
2861
2862 // ------------------------------------------------------------------
2863 // Per-connection tool production

Callers 1

createExecutorFunction · 0.85

Calls 1

findIntegrationRowFunction · 0.85

Tested by

no test coverage detected