Skip to content

Commit

Permalink
feat(deploy): better feedback after deploy fail
Browse files Browse the repository at this point in the history
  • Loading branch information
raaymax committed Oct 22, 2024
1 parent 077fc19 commit b38f78c
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 @@ -265,11 +265,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 b38f78c

Please sign in to comment.