From e590759b7b1a4d14a06ac00f2c65065636231107 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Tue, 24 May 2022 12:14:55 +0200 Subject: [PATCH] Don't try to run pools parser if db is not enabled --- backend/src/index.ts | 2 -- backend/src/tasks/pools-updater.ts | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/backend/src/index.ts b/backend/src/index.ts index 30c5ecf37..9e90edbc4 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -25,8 +25,6 @@ import databaseMigration from './api/database-migration'; import syncAssets from './sync-assets'; import icons from './api/liquid/icons'; import { Common } from './api/common'; -import mining from './api/mining'; -import HashratesRepository from './repositories/HashratesRepository'; import poolsUpdater from './tasks/pools-updater'; import indexer from './indexer'; diff --git a/backend/src/tasks/pools-updater.ts b/backend/src/tasks/pools-updater.ts index aac301256..05a1da5dc 100644 --- a/backend/src/tasks/pools-updater.ts +++ b/backend/src/tasks/pools-updater.ts @@ -16,7 +16,7 @@ class PoolsUpdater { } public async updatePoolsJson() { - if (['mainnet', 'testnet', 'signet'].includes(config.MEMPOOL.NETWORK) === false) { + if (['mainnet', 'testnet', 'signet'].includes(config.MEMPOOL.NETWORK) === false || config.DATABASE.ENABLED === false) { return; }