diff --git a/elstat/alerts.py b/elstat/alerts.py index d934d78..f7b051f 100644 --- a/elstat/alerts.py +++ b/elstat/alerts.py @@ -43,7 +43,7 @@ class DiscordAlert: # find the last work that had a success cur.execute(f""" SELECT timestamp FROM {worker.name} - WHERE timestamp < ? AND status = true + WHERE timestamp < ? AND status = 1 ORDER BY timestamp DESC LIMIT 1 """, (status['timestamp'], )) @@ -54,7 +54,7 @@ class DiscordAlert: # now we fetch all the downtime after that ts_success cur.execute(f""" SELECT COUNT(*) FROM {worker.name} - WHERE timestamp > ? AND status = false + WHERE timestamp > ? AND status = 0 """, (ts_success,)) row = cur.fetchone()