buildbot: push commands return code error

This commit is contained in:
JerryXiao 2019-09-07 12:33:32 +08:00
parent 91a7c2edfb
commit e3fa77ca6a
Signed by: Jerry
GPG Key ID: 9D9CE43650FF2BAA
1 changed files with 6 additions and 4 deletions

View File

@ -291,8 +291,9 @@ class jobsManager:
except Exception: except Exception:
time_to_sleep = (tries + 1) * 60 time_to_sleep = (tries + 1) * 60
logger.error(f'We are getting problem uploading {f.name}, wait {time_to_sleep} secs') logger.error(f'We are getting problem uploading {f.name}, wait {time_to_sleep} secs')
if not rrun('push_add_time', args=(f.name, time_to_sleep + timeout)): patret = rrun('push_add_time', args=(f.name, time_to_sleep + timeout))
logger.error('Unable to run push_add_time') if not patret is None:
logger.error(f'Unable to run push_add_time, reason: {patret}')
print_exc_plus() print_exc_plus()
if tries + 1 < max_tries: if tries + 1 < max_tries:
sleep(time_to_sleep) sleep(time_to_sleep)
@ -300,8 +301,9 @@ class jobsManager:
break break
else: else:
logger.error(f'Upload {f.name} failed, running push_fail and abort.') logger.error(f'Upload {f.name} failed, running push_fail and abort.')
if not rrun('push_fail', args=(f.name,)): pfret = rrun('push_fail', args=(f.name,))
logger.error('Unable to run push_fail') if not pfret is None:
logger.error(f'Unable to run push_fail, reason: {pfret}')
raise RuntimeError('Unable to upload some files') raise RuntimeError('Unable to upload some files')
logger.info(f'Requesting repo update for {pkg_update_list_human}') logger.info(f'Requesting repo update for {pkg_update_list_human}')
res = "unexpected" res = "unexpected"