From fa034157fe45035e2b188250cc74dcdc62f9ec29 Mon Sep 17 00:00:00 2001 From: Hiroyuki Date: Wed, 21 Aug 2024 20:53:26 +0000 Subject: [PATCH] fix(env): update HealthchecksEnabled to HEALTH_CHECKS_ENABLED --- apps/indexer/README.md | 2 +- apps/indexer/deploy.yml | 2 +- apps/indexer/src/index.ts | 2 +- apps/indexer/src/shared/utils/env.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/indexer/README.md b/apps/indexer/README.md index a88ce4d95..5daafb8e5 100644 --- a/apps/indexer/README.md +++ b/apps/indexer/README.md @@ -21,7 +21,7 @@ You can make sure the api is working by accessing the status endpoint: `http://l |Name|Value|Note| |-|-|- -HealthchecksEnabled|`true` or `false`|Specify if the [Scheduler](./src/index.ts#L42) should send health check pings. +HEALTH_CHECKS_ENABLED|`true` or `false`|Specify if the [Scheduler](./src/index.ts#L42) should send health check pings. SENTRY_DSN|ex: `"https://1234...789@z645.ingest.sentry.io/1234"`|[Sentry DSN](https://docs.sentry.io/product/sentry-basics/dsn-explainer/) used when [initializing](./src/index.ts#L25) Sentry HEALTHCHECKS_SYNC_BLOCKS|ex: `041b2561-be28-4a36-bb3f-36a68f86224e`|[HealthChecks.io](https://healthchecks.io) check ID for the `SyncBlocks` task. HEALTHCHECKS_SYNC_AKT_PRICE_HISTORY|ex: `041b2561-be28-4a36-bb3f-36a68f86224e`|[HealthChecks.io](https://healthchecks.io) check ID for the `SyncAKTPriceHistory` task. diff --git a/apps/indexer/deploy.yml b/apps/indexer/deploy.yml index d655ebc08..300169f60 100644 --- a/apps/indexer/deploy.yml +++ b/apps/indexer/deploy.yml @@ -5,7 +5,7 @@ services: syncer: image: redm4x/console-syncer:1.0.0 env: - - HealthchecksEnabled=true + - HEALTH_CHECKS_ENABLED=true - SENTRY_DSN= - SentryServerName= - HEALTHCHECKS_SYNC_BLOCKS= diff --git a/apps/indexer/src/index.ts b/apps/indexer/src/index.ts index d89f4ae51..227128074 100644 --- a/apps/indexer/src/index.ts +++ b/apps/indexer/src/index.ts @@ -43,7 +43,7 @@ Sentry.init({ Sentry.setTag("chain", env.ACTIVE_CHAIN); const scheduler = new Scheduler({ - healthchecksEnabled: env.HealthchecksEnabled === "true", + healthchecksEnabled: env.HEALTH_CHECKS_ENABLED === "true", errorHandler: (task, error) => { console.error(`Task "${task.name}" failed: `, error); Sentry.captureException(error, { tags: { task: task.name } }); diff --git a/apps/indexer/src/shared/utils/env.ts b/apps/indexer/src/shared/utils/env.ts index 796d4a1ea..ede1d5299 100644 --- a/apps/indexer/src/shared/utils/env.ts +++ b/apps/indexer/src/shared/utils/env.ts @@ -9,7 +9,7 @@ export const env = { SENTRY_DSN: process.env.SENTRY_DSN, NODE_ENV: process.env.NODE_ENV, SentryServerName: process.env.SentryServerName, - HealthchecksEnabled: process.env.HealthchecksEnabled, + HEALTH_CHECKS_ENABLED: process.env.HEALTH_CHECKS_ENABLED, AKASH_DATABASE_CS: process.env.AKASH_DATABASE_CS, PASSAGE_DATABASE_CS: process.env.PASSAGE_DATABASE_CS, JUNO_DATABASE_CS: process.env.JUNO_DATABASE_CS,