Updating #of trials for deployment status before timing out (#170)
* Updating #of trials for deployment status before timing out * Updating index.json
This commit is contained in:
Родитель
e0412be393
Коммит
1e338dcfa6
|
@ -326,7 +326,7 @@
|
|||
"webapp": [
|
||||
{
|
||||
"filename": "webapp-0.2.6-py2.py3-none-any.whl",
|
||||
"sha256Digest": "88acaec8a17b2be23f1f33a60fbfc4d9365fafa35e593fd34518d0d71f1e8383",
|
||||
"sha256Digest": "758bf8c5cdea08dc4fade6bdd8714a01d737aefd400f4ccac55980ef6a387e7d",
|
||||
"downloadUrl": "https://github.com/panchagnula/azure-cli-extensions/raw/sisirap-extensions-whl/dist/webapp-0.2.6-py2.py3-none-any.whl",
|
||||
"metadata": {
|
||||
"azext.isPreview": true,
|
||||
|
|
|
@ -306,7 +306,7 @@ def _zip_deploy(cmd, rg_name, name, zip_path):
|
|||
def _check_deployment_status(deployment_url, authorization):
|
||||
num_trials = 1
|
||||
import requests
|
||||
while num_trials < 9:
|
||||
while num_trials < 200:
|
||||
response = requests.get(deployment_url, headers=authorization)
|
||||
res_dict = response.json()
|
||||
num_trials = num_trials + 1
|
||||
|
@ -317,4 +317,9 @@ def _check_deployment_status(deployment_url, authorization):
|
|||
elif res_dict['status'] == 4:
|
||||
return
|
||||
logger.warning(res_dict['progress'])
|
||||
# if the deployment is taking longer than expected
|
||||
r = requests.get(deployment_url, headers=authorization)
|
||||
if r.json()['status'] != 4:
|
||||
logger.warning("""Deployment is taking longer than expected. Please verify status at '{}'
|
||||
beforing launching the app""".format(deployment_url))
|
||||
return
|
||||
|
|
Загрузка…
Ссылка в новой задаче