Skip to content

Commit

Permalink
Remove debug print and improve default message (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
lava authored Nov 19, 2024
1 parent 360ab66 commit 3166db1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cli/tenzir_platform/subcommand_alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -158,7 +157,7 @@ def alert_subcommand(platform: PlatformEnvironment, argv):
webhook_url = args["<webhook_url>"]
webhook_body = args["<webhook_body>"]
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"]:
Expand Down

0 comments on commit 3166db1

Please sign in to comment.