mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-02 02:13:55 +00:00
Fixed problem with javascript long for thread ids
This commit is contained in:
1 parent
eebaa86e59
commit
7cacecf48c
3 files changed
+6
-6
No files matched your search
@@ -53,7 +53,7 @@ class LiveDataReceiver(threading.Thread):
|
||||
|
||||
# blocking call by updatecount setting
|
||||
conf.setParameters(dict(eventname=self.eventname, racename=self.racename, sinceupdate=self.updatecount))
|
||||
conf.setLogging(False)
|
||||
conf.setLogging(True)
|
||||
|
||||
try:
|
||||
# need to lock because other threads could overwrite information
|
||||
|
||||
@@ -196,7 +196,7 @@ def configuredListeners(context, request):
|
||||
for key, listener in threaded_listener.items():
|
||||
out.append( {'host': listener.host, 'port': listener.port,
|
||||
'eventname': listener.eventname, 'last_update': listener.last_update and listener.last_update.strftime('%d.%m %H:%M:%S') or '-',
|
||||
'paused' : listener.paused, 'running': listener.running, 'id' : key,
|
||||
'paused' : listener.paused, 'running': listener.running, 'xid' : str(key),
|
||||
'racename': listener.racename} )
|
||||
|
||||
return out
|
||||
@@ -209,7 +209,7 @@ def pauseListener(context, request):
|
||||
for v in threaded_listener.values():
|
||||
v.paused = True
|
||||
else:
|
||||
if threaded_listener.has_key(tid):
|
||||
if threaded_listener.has_key(int(tid)):
|
||||
threaded_listener.get(tid).paused = True
|
||||
return True
|
||||
|
||||
@@ -221,14 +221,14 @@ def unPauseListener(context, request):
|
||||
for v in threaded_listener.values():
|
||||
v.paused = False
|
||||
else:
|
||||
if threaded_listener.has_key(tid):
|
||||
if threaded_listener.has_key(int(tid)):
|
||||
threaded_listener.get(tid).paused = False
|
||||
return True
|
||||
|
||||
@jsonize
|
||||
def stopListener(context, request):
|
||||
tid = int(request.params.get('tid', 0))
|
||||
if threaded_listener.has_key(tid):
|
||||
if threaded_listener.has_key(int(tid)):
|
||||
threaded_listener.get(tid).running = False
|
||||
return True
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
GET('configuredListeners', {}, function(data) {
|
||||
options = '';
|
||||
for (d in data) {
|
||||
options += format('<option value="{id}">{host}:{port} | {eventname} | {racename} | Last Update: {last_update} Paused: {paused} Running: {running}</option>', data[d]);
|
||||
options += format('<option value="'+data[d].xid+'">{host}:{port} | {eventname} | {racename} | Last Update: {last_update} Paused: {paused} Running: {running}</option>', data[d]);
|
||||
}
|
||||
|
||||
if (options == '')
|
||||
|
||||
Reference in new issue
Block a user