Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

Commit

Permalink
CLI ping command shows default timeout in help description (#1356)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Tang committed May 28, 2021
1 parent 4115df3 commit 175c324
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cli/waiter/subcommands/ping.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ def token_explicitly_created_on_cluster(cluster, token_cluster_name):

def register(add_parser):
"""Adds this sub-command's parser and returns the action function"""
default_timeout = 300
parser = add_parser('ping', help='ping token by name')
parser.add_argument('token-or-service-id')
parser.add_argument('--timeout', '-t', help='read timeout (in seconds) for ping request',
type=check_positive, default=300)
parser.add_argument('--timeout', '-t', help=f'read timeout (in seconds) for ping request (default is '
f'{default_timeout} seconds)',
type=check_positive, default=default_timeout)
parser.add_argument('--service-id', '-s', help='ping by service id instead of token',
dest='is-service-id', action='store_true')
parser.add_argument('--no-wait', '-n', help='do not wait for ping request to return',
Expand Down

0 comments on commit 175c324

Please sign in to comment.