Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
agkyra
Commits
f6e4a770
Commit
f6e4a770
authored
Jun 03, 2015
by
Stavros Sachtouris
Committed by
Giorgos Korfiatis
Oct 19, 2015
Browse files
Bug fix: repeat heartbeat in helper server
parent
353283cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
agkyra/protocol.py
View file @
f6e4a770
...
...
@@ -182,11 +182,12 @@ class WebSocketProtocol(WebSocket):
def
heartbeat
(
self
):
if
not
self
.
db
:
self
.
db
=
sqlite3
.
connect
(
self
.
session_db
)
self
.
db
.
execute
(
'BEGIN'
)
self
.
db
.
execute
(
'UPDATE %s SET beat="%s" WHERE ui_id="%s"'
%
(
self
.
session_relation
,
time
.
time
(),
self
.
ui_id
))
self
.
db
.
commit
()
time
.
sleep
(
2
)
while
True
:
self
.
db
.
execute
(
'BEGIN'
)
self
.
db
.
execute
(
'UPDATE %s SET beat="%s" WHERE ui_id="%s"'
%
(
self
.
session_relation
,
time
.
time
(),
self
.
ui_id
))
self
.
db
.
commit
()
time
.
sleep
(
2
)
def
_get_default_sync
(
self
):
"""Get global.default_sync or pick the first sync as default
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment