⬆ fix: retry executor push

This commit is contained in:
Florian Hönicke
2023-04-22 19:09:25 +02:00
parent 5d9c5a79c3
commit 2be12c78bc
3 changed files with 12 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ def read_requirements():
setup( setup(
name='gptdeploy', name='gptdeploy',
version='0.18.26', version='0.18.27',
description='Use natural language interface to generate, deploy and update your microservice infrastructure.', description='Use natural language interface to generate, deploy and update your microservice infrastructure.',
long_description=open('README.md', 'r', encoding='utf-8').read(), long_description=open('README.md', 'r', encoding='utf-8').read(),
long_description_content_type='text/markdown', long_description_content_type='text/markdown',

View File

@@ -1,2 +1,2 @@
__version__ = '0.18.26' __version__ = '0.18.27'
from src.cli import main from src.cli import main

View File

@@ -62,6 +62,16 @@ In this case, please cancel this run, rerun your gptdeploy command and login int
def push_executor(dir_path): def push_executor(dir_path):
for i in range(3):
try:
return _push_executor(dir_path)
except Exception as e:
if i == 2:
raise e
print(f'connection error - retrying in 5 seconds...')
time.sleep(5)
def _push_executor(dir_path):
dir_path = Path(dir_path) dir_path = Path(dir_path)
md5_hash = hashlib.md5() md5_hash = hashlib.md5()
bytesio = archive_package(dir_path) bytesio = archive_package(dir_path)