From 49456b54efb853bd88b74a1fb1e139a13a197f4c Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Mon, 15 Jul 2024 16:04:51 +0200 Subject: [PATCH] docs(core): Fix docs for TypeORMHealthCheckStrategy Closes #2730 --- .../type-ormhealth-check-strategy.md | 16 +++++++++------- .../typeorm-health-check-strategy.ts | 14 ++++++++------ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/docs/docs/reference/typescript-api/health-check/type-ormhealth-check-strategy.md b/docs/docs/reference/typescript-api/health-check/type-ormhealth-check-strategy.md index ea15934dd7..393e9c9a30 100644 --- a/docs/docs/reference/typescript-api/health-check/type-ormhealth-check-strategy.md +++ b/docs/docs/reference/typescript-api/health-check/type-ormhealth-check-strategy.md @@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription'; ## TypeORMHealthCheckStrategy - + A HealthCheckStrategy used to check the health of the database. This health check is included by default, but can be customized by explicitly adding it to the @@ -24,12 +24,14 @@ import { TypeORMHealthCheckStrategy } from '@vendure/core'; export const config = { // ... - systemOptions: [ - // The default key is "database" and the default timeout is 1000ms - // Sometimes this is too short and leads to false negatives in the - // /health endpoint. - new TypeORMHealthCheckStrategy({ key: 'postgres-db', timeout: 5000 }), - ] + systemOptions: { + healthChecks:[ + // The default key is "database" and the default timeout is 1000ms + // Sometimes this is too short and leads to false negatives in the + // /health endpoint. + new TypeORMHealthCheckStrategy({ key: 'postgres-db', timeout: 5000 }), + ] + } } ``` diff --git a/packages/core/src/health-check/typeorm-health-check-strategy.ts b/packages/core/src/health-check/typeorm-health-check-strategy.ts index 7cc38a554f..7e26b19d6b 100644 --- a/packages/core/src/health-check/typeorm-health-check-strategy.ts +++ b/packages/core/src/health-check/typeorm-health-check-strategy.ts @@ -22,12 +22,14 @@ export interface TypeORMHealthCheckOptions { * * export const config = { * // ... - * systemOptions: [ - * // The default key is "database" and the default timeout is 1000ms - * // Sometimes this is too short and leads to false negatives in the - * // /health endpoint. - * new TypeORMHealthCheckStrategy({ key: 'postgres-db', timeout: 5000 }), - * ] + * systemOptions: { + * healthChecks:[ + * // The default key is "database" and the default timeout is 1000ms + * // Sometimes this is too short and leads to false negatives in the + * // /health endpoint. + * new TypeORMHealthCheckStrategy({ key: 'postgres-db', timeout: 5000 }), + * ] + * } * } * ``` *