mirror of
https://github.com/mempool/mempool.git
synced 2025-02-22 06:21:46 +01:00
Merge pull request #2362 from mempool/nymkappa/bugfix/db-deadlock
Await mysql queries in order to avoid deadlock
This commit is contained in:
commit
b121e46bcc
1 changed files with 2 additions and 2 deletions
|
@ -83,7 +83,7 @@ class NetworkSyncService {
|
||||||
logger.info(`${progress} nodes updated. ${deletedSockets} sockets deleted`);
|
logger.info(`${progress} nodes updated. ${deletedSockets} sockets deleted`);
|
||||||
|
|
||||||
// If a channel if not present in the graph, mark it as inactive
|
// If a channel if not present in the graph, mark it as inactive
|
||||||
nodesApi.$setNodesInactive(graphNodesPubkeys);
|
await nodesApi.$setNodesInactive(graphNodesPubkeys);
|
||||||
|
|
||||||
if (config.MAXMIND.ENABLED) {
|
if (config.MAXMIND.ENABLED) {
|
||||||
$lookupNodeLocation();
|
$lookupNodeLocation();
|
||||||
|
@ -121,7 +121,7 @@ class NetworkSyncService {
|
||||||
logger.info(`${progress} channels updated`);
|
logger.info(`${progress} channels updated`);
|
||||||
|
|
||||||
// If a channel if not present in the graph, mark it as inactive
|
// If a channel if not present in the graph, mark it as inactive
|
||||||
channelsApi.$setChannelsInactive(graphChannelsIds);
|
await channelsApi.$setChannelsInactive(graphChannelsIds);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.err(`Cannot update channel list. Reason: ${(e instanceof Error ? e.message : e)}`);
|
logger.err(`Cannot update channel list. Reason: ${(e instanceof Error ? e.message : e)}`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue