Skip to content

Commit

Permalink
Merge pull request #211 from zalando-stups/210-configurable-wait-inte…
Browse files Browse the repository at this point in the history
…rval

Configurable wait interval
  • Loading branch information
jmcs committed May 12, 2016
2 parents 3a02142 + 0e5187a commit 0085e0a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions senza/cli.py
Expand Up @@ -1368,8 +1368,10 @@ def failure_event(event: dict):
@click.option('-d', '--deletion', is_flag=True, help='Wait for deletion instead of CREATE_COMPLETE')
@click.option('-t', '--timeout', type=click.IntRange(0, 7200, clamp=True), metavar='SECS', default=1800,
help='Maximum wait time (default: 1800s)')
@click.option('-i', '--interval', default=5, type=click.IntRange(1, 600, clamp=True),
help='Time between checks (default: 5s)')
@region_option
def wait(stack_ref, region, deletion, timeout):
def wait(stack_ref, region, deletion, timeout, interval):
'''Wait for successfull stack creation or deletion.
Supports waiting for more than one stack up to timeout seconds.'''
Expand Down Expand Up @@ -1409,7 +1411,7 @@ def wait(stack_ref, region, deletion, timeout):
return
else:
raise click.UsageError('No matching stack for "{}" found'.format(' '.join(stack_ref)))
time.sleep(5)
time.sleep(interval)
raise click.Abort()


Expand Down

0 comments on commit 0085e0a

Please sign in to comment.