Commit f6e4a770 authored by Stavros Sachtouris's avatar Stavros Sachtouris Committed by Giorgos Korfiatis
Browse files

Bug fix: repeat heartbeat in helper server

parent 353283cf
...@@ -182,11 +182,12 @@ class WebSocketProtocol(WebSocket): ...@@ -182,11 +182,12 @@ class WebSocketProtocol(WebSocket):
def heartbeat(self): def heartbeat(self):
if not self.db: if not self.db:
self.db = sqlite3.connect(self.session_db) self.db = sqlite3.connect(self.session_db)
self.db.execute('BEGIN') while True:
self.db.execute('UPDATE %s SET beat="%s" WHERE ui_id="%s"' % ( self.db.execute('BEGIN')
self.session_relation, time.time(), self.ui_id)) self.db.execute('UPDATE %s SET beat="%s" WHERE ui_id="%s"' % (
self.db.commit() self.session_relation, time.time(), self.ui_id))
time.sleep(2) self.db.commit()
time.sleep(2)
def _get_default_sync(self): def _get_default_sync(self):
"""Get global.default_sync or pick the first sync as default """Get global.default_sync or pick the first sync as default
......
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