diff options
author | Maximilien Cuony <maximilien@theglu.org> | 2016-09-12 19:36:23 +0200 |
---|---|---|
committer | Maximilien Cuony <maximilien@theglu.org> | 2016-09-12 19:36:23 +0200 |
commit | 1b02875f393e15609e6422311541cb361b0bd428 (patch) | |
tree | 70d6c96113bae1b890ac268c4c0d2826182dbd71 | |
parent | 18fb541004d3666cf722e3eeae8ed9aeab9503d2 (diff) | |
download | glutte-serial-web-1b02875f393e15609e6422311541cb361b0bd428.tar.gz glutte-serial-web-1b02875f393e15609e6422311541cb361b0bd428.tar.bz2 glutte-serial-web-1b02875f393e15609e6422311541cb361b0bd428.zip |
Remove debug for ADSL and try to log more errors for ws
-rw-r--r-- | adsl.py | 3 | ||||
-rw-r--r-- | templates/index.html | 4 |
2 files changed, 4 insertions, 3 deletions
@@ -123,7 +123,7 @@ class Monitor(threading.Thread): if self.last_balise and (datetime.datetime.now() - self.last_balise).total_seconds() > 10800: result.append("No FSM_BALISE_LONGUE nor FSM_BALISE_SPECIALE for more than 3 hours !") - if self.current_state and self.current_state in MAXIMUM_STATES and (datetime.datetime.now() - self.status_starttime[self.current_state]).total_seconds() > MAXIMUM_STATES[self.current_state][0] / 10: + if self.current_state and self.current_state in MAXIMUM_STATES and (datetime.datetime.now() - self.status_starttime[self.current_state]).total_seconds() > MAXIMUM_STATES[self.current_state][0]: result.append("The FSM has been in the state {} for more than {} !".format(self.current_state, MAXIMUM_STATES[self.current_state][1])) return result @@ -160,6 +160,7 @@ class ADSL(threading.Thread): offset = updates[0].update_id + 1 try: + print(updates[0].message.chat.id) if int(updates[0].message.chat.id) == int(config.TELEGRAM_GROUP): if updates[0].message.text.startswith('/status'): diff --git a/templates/index.html b/templates/index.html index 9687b25..815623a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -51,11 +51,11 @@ } } - socket.onerror = function() { + socket.onerror = function(e) { closed = true; if (!retry_scheduled) { - add_message("{System} Websocket error. Trying again in 3s :(\n"); + add_message("{System} Websocket error. Trying again in 3s :( " + e + "\n"); setTimeout(init_socket, 3000); retry_scheduled = true; } |