From 8af7b683b6c9ad39cd3f2a65c11e888e51685c24 Mon Sep 17 00:00:00 2001 From: Alex Tau Date: Sat, 7 Jun 2025 00:38:31 +0300 Subject: [PATCH] fix crash on remind run --- flake.lock | 8 ++++---- src/lego_monitoring/__init__.py | 2 +- src/lego_monitoring/checks/vulnix/__init__.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index 2d367f7..3738870 100644 --- a/flake.lock +++ b/flake.lock @@ -2,16 +2,16 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1745487689, - "narHash": "sha256-FQoi3R0NjQeBAsEOo49b5tbDPcJSMWc3QhhaIi9eddw=", + "lastModified": 1749086602, + "narHash": "sha256-DJcgJMekoxVesl9kKjfLPix2Nbr42i7cpEHJiTnBUwU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5630cf13cceac06cefe9fc607e8dfa8fb342dde3", + "rev": "4792576cb003c994bd7cc1edada3129def20b27d", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-24.11", + "ref": "nixos-25.05", "repo": "nixpkgs", "type": "github" } diff --git a/src/lego_monitoring/__init__.py b/src/lego_monitoring/__init__.py index b070580..aafc1ca 100644 --- a/src/lego_monitoring/__init__.py +++ b/src/lego_monitoring/__init__.py @@ -89,7 +89,7 @@ async def async_main(): for checker in checker_sets[enabled_set]: checkers.append(checker) - checker_sets[check_sets.REMIND][0].check_args = checkers + checker_sets[check_sets.REMIND][0].check_args = [checkers] command_manager = CommandHandlerManager(checkers) await command_manager.attach_handlers(tg_client) diff --git a/src/lego_monitoring/checks/vulnix/__init__.py b/src/lego_monitoring/checks/vulnix/__init__.py index 81f4820..9fefcff 100644 --- a/src/lego_monitoring/checks/vulnix/__init__.py +++ b/src/lego_monitoring/checks/vulnix/__init__.py @@ -7,12 +7,12 @@ from .vulnix import get_vulnix_output IS_TESTING = False -def vulnix_check() -> list[Alert]: +async def vulnix_check() -> list[Alert]: alert_list = [] try: vulnix_output = get_vulnix_output(IS_TESTING) except Exception as e: - send_alert( + await send_alert( Alert( alert_type=AlertType.ERROR, message=f"Exception {type(e).__name__} while calling vulnix: {e}",