From 3166db16f20acd8af629b21902bc06d9e80926dd Mon Sep 17 00:00:00 2001 From: Benno Evers Date: Tue, 19 Nov 2024 17:33:03 +0100 Subject: [PATCH] Remove debug print and improve default message (#58) --- cli/tenzir_platform/subcommand_alert.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cli/tenzir_platform/subcommand_alert.py b/cli/tenzir_platform/subcommand_alert.py index 5fc4e62..2c78a5d 100644 --- a/cli/tenzir_platform/subcommand_alert.py +++ b/cli/tenzir_platform/subcommand_alert.py @@ -79,7 +79,6 @@ def add( ): node_id = _resolve_node_identifier(client, workspace_id, node) seconds = parse_duration(duration) - print(type(seconds)) if not seconds: print(f"invalid duration: {duration}") return @@ -158,7 +157,7 @@ def alert_subcommand(platform: PlatformEnvironment, argv): webhook_url = args[""] webhook_body = args[""] if webhook_body is None: - webhook_body = f'{{"text": "Node $NODE_ID disconnected for more than {duration}s"}}' + webhook_body = f'{{"text": "Node $NODE_NAME disconnected for more than {duration}s"}}' assert json.loads(webhook_body), "body must be valid json" add(client, workspace_id, node, duration, webhook_url, webhook_body) elif args["delete"]: