2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 14:05:33 +00:00

[#2058] hammer.py: retry upload on 504

This commit is contained in:
Andrei Pavel
2021-09-02 15:02:08 +03:00
parent 09f0616a10
commit 3f57f06c2e

View File

@@ -2759,7 +2759,16 @@ def upload_to_repo(args, pkgs_dir):
log.info("upload cmd: %s", upload_cmd)
log.info("fp: %s", fp)
cmd = upload_cmd % fp
execute(cmd)
attempts=4
while attempts > 0:
exitcode, output = execute(cmd, capture=True)
if exitcode != 0 and '504 Gateway Time-out' in output:
log.info('Trying again after 8 seconds...')
attempts -= 1
time.sleep(8)
else:
break
def build_cmd(args):