Skip to content

Commit

Permalink
adding warning when timeout is greater than 300
Browse files Browse the repository at this point in the history
  • Loading branch information
doron2402 committed Jul 11, 2017
1 parent fa0e3cd commit 29730c0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions zappa/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,9 @@ def update(self):
# Make sure we're in a venv.
self.check_venv()

# Validate settings
self.validate_settings()

# Execute the prebuild script
if self.prebuild_script:
self.execute_prebuild_script()
Expand Down Expand Up @@ -2452,6 +2455,14 @@ def check_venv(self):
click.style("Zappa", bold=True) + " requires an " + click.style("active virtual environment", bold=True, fg="red") + "!\n" +
"Learn more about virtual environments here: " + click.style("http://docs.python-guide.org/en/latest/dev/virtualenvs/", bold=False, fg="cyan"))


def validate_settings(self):
""" Validate settings """
# Validate timeout_seconds
if self.stage_config.get('timeout_seconds') > 300:
click.echo(click.style("Warning!", fg="red", bold=True) + "`timeout_seconds` must be less or equal to 300!"


def silence(self):
"""
Route all stdout to null.
Expand Down

0 comments on commit 29730c0

Please sign in to comment.