Make sure to try/catch indexing code in case db is not available
This commit is contained in:
parent
63aecb1fd5
commit
e8903ee103
@ -164,12 +164,17 @@ class Server {
|
||||
}
|
||||
}
|
||||
|
||||
runIndexingWhenReady() {
|
||||
async runIndexingWhenReady() {
|
||||
if (!Common.indexingEnabled() || mempool.hasPriority()) {
|
||||
return;
|
||||
}
|
||||
blocks.$generateBlockDatabase();
|
||||
mining.$generateNetworkHashrateHistory();
|
||||
|
||||
try {
|
||||
await blocks.$generateBlockDatabase();
|
||||
await mining.$generateNetworkHashrateHistory();
|
||||
} catch (e) {
|
||||
logger.info(`Unable to run indexing right now, trying again later. ` + e);
|
||||
}
|
||||
}
|
||||
|
||||
setUpWebsocketHandling() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user