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

Function integrationSetHealthCheck

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

Source from the content-addressed store, hash-verified

3471 // No plugin hook, no config read-modify-write, nothing a plugin's own
3472 // config cycle can clobber.
3473 const integrationSetHealthCheck = (
3474 slug: IntegrationSlug,
3475 spec: HealthCheckSpec | null,
3476 ): Effect.Effect<void, IntegrationNotFoundError | OrgWriteDeniedError | StorageFailure> =>
3477 transaction(
3478 Effect.gen(function* () {
3479 yield* guardOrgWrite();
3480 const row = yield* findIntegrationRow(slug);
3481 if (!row) return yield* new IntegrationNotFoundError({ slug });
3482 yield* core.updateMany("integration", {
3483 where: (b: AnyCb) => b("slug", "=", String(slug)),
3484 set: { health_check: spec, updated_at: new Date() },
3485 });
3486 }),
3487 );
3488
3489 // ------------------------------------------------------------------
3490 // 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