Commit aab0b659 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

Commit before trying to lock, to avoid blocking

parent c3ea25b0
......@@ -1675,6 +1675,8 @@ def sync_projects():
def trigger_sync(retries=3, retry_wait=1.0):
transaction.commit()
cursor = connection.cursor()
locked = True
try:
......@@ -1693,7 +1695,6 @@ def trigger_sync(retries=3, retry_wait=1.0):
return False
sleep(retry_wait)
transaction.commit()
sync_projects()
return True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment