Fix database used when database disabled
This commit is contained in:
parent
5e10b75b87
commit
9734052477
@ -127,7 +127,7 @@ class PoolsParser {
|
|||||||
if (!equals(JSON.parse(existingPool.addresses), poolObj.addresses) || !equals(JSON.parse(existingPool.regexes), poolObj.regexes)) {
|
if (!equals(JSON.parse(existingPool.addresses), poolObj.addresses) || !equals(JSON.parse(existingPool.regexes), poolObj.regexes)) {
|
||||||
finalPoolDataUpdate.push(poolObj);
|
finalPoolDataUpdate.push(poolObj);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (config.DATABASE.ENABLED) {
|
||||||
// Double check that if we're not just renaming a pool (same address same regex)
|
// Double check that if we're not just renaming a pool (same address same regex)
|
||||||
const [poolToRename]: any[] = await DB.query(`
|
const [poolToRename]: any[] = await DB.query(`
|
||||||
SELECT * FROM pools
|
SELECT * FROM pools
|
||||||
|
@ -105,7 +105,9 @@ class Server {
|
|||||||
.use(express.text({ type: ['text/plain', 'application/base64'] }))
|
.use(express.text({ type: ['text/plain', 'application/base64'] }))
|
||||||
;
|
;
|
||||||
|
|
||||||
|
if (config.DATABASE.ENABLED) {
|
||||||
await priceUpdater.$initializeLatestPriceWithDb();
|
await priceUpdater.$initializeLatestPriceWithDb();
|
||||||
|
}
|
||||||
|
|
||||||
this.server = http.createServer(this.app);
|
this.server = http.createServer(this.app);
|
||||||
this.wss = new WebSocket.Server({ server: this.server });
|
this.wss = new WebSocket.Server({ server: this.server });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user