Skip to content

Commit

Permalink
fix(env): update HealthchecksEnabled to HEALTH_CHECKS_ENABLED
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroyukikumazawa authored and root committed Sep 9, 2024
1 parent ef55b73 commit fa03415
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/indexer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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://[email protected]/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.
Expand Down
2 changes: 1 addition & 1 deletion apps/indexer/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
syncer:
image: redm4x/console-syncer:1.0.0
env:
- HealthchecksEnabled=true
- HEALTH_CHECKS_ENABLED=true
- SENTRY_DSN=<SENTRY_DSN>
- SentryServerName=<SENTRY_SERVER_NAME>
- HEALTHCHECKS_SYNC_BLOCKS=<HEALTH_CHECKS_ID>
Expand Down
2 changes: 1 addition & 1 deletion apps/indexer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 } });
Expand Down
2 changes: 1 addition & 1 deletion apps/indexer/src/shared/utils/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit fa03415

Please sign in to comment.