feat: improve commit times by using cache from the diff

This commit is contained in:
Swann 2021-01-12 10:29:27 +01:00
parent 12bd4a603b
commit e3bd7ea445
No known key found for this signature in database
GPG Key ID: E1D3641A7C43AACB
2 changed files with 5 additions and 5 deletions

View File

@ -44,7 +44,7 @@ from . import environment
DEPENDENCIES = {
("replication", '0.1.21'),
("replication", '0.1.22'),
}

View File

@ -138,13 +138,13 @@ class PushTimer(Timer):
def execute(self):
while self.q_push:
node_id = self.q_push.pop()
node = session.get(uuid=node_id)
node = session.get(uuid= self.q_push.pop())
start = utils.current_milli_time()
if node.has_changed():
try:
session.commit(node.uuid)
session.push(node.uuid)
session.push(node.uuid, check_data=False)
except ReferenceError:
logging.debug(f"Reference error {node.uuid}")
if not node.is_valid():