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

Function integrationSetHealthCheck

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

Source from the content-addressed store, hash-verified

3408 // No plugin hook, no config read-modify-write, nothing a plugin's own
3409 // config cycle can clobber.
3410 const integrationSetHealthCheck = (
3411 slug: IntegrationSlug,
3412 spec: HealthCheckSpec | null,
3413 ): Effect.Effect<void, IntegrationNotFoundError | OrgWriteDeniedError | StorageFailure> =>
3414 transaction(
3415 Effect.gen(function* () {
3416 yield* guardOrgWrite();
3417 const row = yield* findIntegrationRow(slug);
3418 if (!row) return yield* new IntegrationNotFoundError({ slug });
3419 yield* core.updateMany("integration", {
3420 where: (b: AnyCb) => b("slug", "=", String(slug)),
3421 set: { health_check: spec, updated_at: new Date() },
3422 });
3423 }),
3424 );
3425
3426 // ------------------------------------------------------------------
3427 // Per-connection tool production

Callers 1

createExecutorFunction · 0.85

Calls 3

guardOrgWriteFunction · 0.85
findIntegrationRowFunction · 0.85
transactionFunction · 0.70

Tested by

no test coverage detected