Skip to content

Commit

Permalink
Merge pull request #605 from writer/deploy_feedback
Browse files Browse the repository at this point in the history
feat(deploy): better feedback after deploy fail
  • Loading branch information
ramedina86 authored Oct 28, 2024
2 parents 7e3fa36 + b38f78c commit aa9b61c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/writer/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,16 @@ def upload_package(deploy_url, tar, token, env, verbose=False, sleep_interval=5)
print("Deployment successful")
print(f"URL: {url}")
sys.exit(0)
elif status == "FAILED":
print("Deployment failed")
print(f"URL: {url}")
sys.exit(1)
else:
time.sleep(sleep_interval)
check_service_status(deploy_url, token, build_id, build_time, start_time, datetime.now(pytz.timezone('UTC')), status)
print("Deployment failed")
sys.exit(1)
print("Deployment status timeout")
print(f"URL: {url}")
sys.exit(2)

def on_error_print_and_raise(resp, verbose=False):
try:
Expand Down

0 comments on commit aa9b61c

Please sign in to comment.