not sending ping to clients after every sync addition, only after commit which significantly speeds up imports

This commit is contained in:
zadam 2020-03-14 12:39:55 +01:00
parent 44219e7ccc
commit 3fa3e912a4
2 changed files with 2 additions and 2 deletions

View File

@ -209,6 +209,8 @@ async function transactional(func) {
transactionActive = false;
resolve();
setTimeout(() => require('./ws').sendPingToAllClients(), 50);
}
catch (e) {
if (transactionActive) {

View File

@ -24,8 +24,6 @@ async function addEntitySync(entityName, entityId, sourceId) {
const sync = await insertEntitySync(entityName, entityId, sourceId);
syncs.push(sync);
setTimeout(() => require('./ws').sendPingToAllClients(), 50);
}
async function addEntitySyncsForSector(entityName, entityPrimaryKey, sector) {