Merge pull request #1719 from mempool/nymkappa/bugfix/pool-parser-db-check

Don't try to run pools parser if db is not enabled
This commit is contained in:
wiz 2022-05-31 17:35:15 +09:00 committed by GitHub
commit ac0e430495
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -25,8 +25,6 @@ import databaseMigration from './api/database-migration';
import syncAssets from './sync-assets'; import syncAssets from './sync-assets';
import icons from './api/liquid/icons'; import icons from './api/liquid/icons';
import { Common } from './api/common'; import { Common } from './api/common';
import mining from './api/mining';
import HashratesRepository from './repositories/HashratesRepository';
import poolsUpdater from './tasks/pools-updater'; import poolsUpdater from './tasks/pools-updater';
import indexer from './indexer'; import indexer from './indexer';

View File

@ -16,7 +16,7 @@ class PoolsUpdater {
} }
public async updatePoolsJson() { 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; return;
} }