From 362605702eb6a8b8783182d067faa83081b0067e Mon Sep 17 00:00:00 2001 From: smart_ex Date: Wed, 22 Jun 2022 20:13:05 +1000 Subject: [PATCH] job link --- src/config.ts | 2 +- src/services/health.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.ts b/src/config.ts index 79b8d96..f005243 100644 --- a/src/config.ts +++ b/src/config.ts @@ -14,7 +14,7 @@ export const privateKey = process.env.PRIVATE_KEY; export const instances = tornConfig.instances; export const torn = tornConfig; export const port = process.env.APP_PORT || 8000; -export const host = process.env.VIRTUAL_HOST || `localhost:${port}`; +export const host = process.env.NODE_ENV === 'production' ? 'https://' + process.env.VIRTUAL_HOST : `http://localhost:${port}`; export const tornadoServiceFee = Number(process.env.REGULAR_TORNADO_WITHDRAW_FEE); export const rewardAccount = process.env.REWARD_ACCOUNT; export const governanceAddress = '0x5efda50f22d34F262c29268506C5Fa42cB56A1Ce'; diff --git a/src/services/health.service.ts b/src/services/health.service.ts index 4caab11..f8aeda2 100644 --- a/src/services/health.service.ts +++ b/src/services/health.service.ts @@ -76,7 +76,7 @@ export class HealthService { await this.store.client.zadd('errors:log', 'INCR', 1, e.message); if (e?.code === 'REVERTED') { - const jobUrl = `https://${this.config.host}/v1/jobs/${jobId}`; + const jobUrl = `${this.config.host}/v1/jobs/${jobId}`; await this.pushAlert({ message: `${e.message} \n ${jobUrl}`, type: 'REVERTED',