diff --git a/source/logic/main.py b/source/logic/main.py index 52eea7f..1f89705 100644 --- a/source/logic/main.py +++ b/source/logic/main.py @@ -206,7 +206,7 @@ def main(): ### get old state and examine whether the check shall be executed rows1 = sqlite_query_get( database_path, - "SELECT MIN(timestamp) FROM results WHERE (check_name = :check_name) AND (notification_sent = TRUE);", + "SELECT MAX(timestamp) FROM results WHERE (check_name = :check_name) AND (notification_sent = TRUE);", { "check_name": check_data["name"], } @@ -378,7 +378,7 @@ def main(): ) ) - if (not _os.exists(args.mutex_path)): + if (not _os.path.exists(args.mutex_path)): pass else: _os.remove(args.mutex_path)