aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <code@jaseg.net>2020-01-23 11:48:45 +0100
committerjaseg <code@jaseg.net>2020-01-23 11:48:45 +0100
commitdbef4d09deba4e9a94b747f04cc40dd823edc0d4 (patch)
treefc63c4811e1060e8abff59db3ae03d7fd92e104c
parent6c2bf701f63c36ce12208fd87136954aa9839e58 (diff)
downloadinfra-dbef4d09deba4e9a94b747f04cc40dd823edc0d4.tar.gz
infra-dbef4d09deba4e9a94b747f04cc40dd823edc0d4.tar.bz2
infra-dbef4d09deba4e9a94b747f04cc40dd823edc0d4.zip
notify: add some more monitoring
-rw-r--r--notification_proxy.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/notification_proxy.py b/notification_proxy.py
index d30a23d..fcef50f 100644
--- a/notification_proxy.py
+++ b/notification_proxy.py
@@ -150,6 +150,9 @@ def notify(route_name):
with db as conn:
conn.execute('INSERT OR REPLACE INTO heartbeats_seen VALUES (?, ?, 0)', (route_name, int(time.time())))
+ elif scope == 'error':
+ print(f'Device error: {kwargs}')
+
return 'success'
@uwsgidecorators.timer(60)