parent
432bdc7e3e
commit
b7bde27b3c
12 changed files with 164 additions and 149 deletions
|
@ -112,13 +112,13 @@ def _get_build_status(build_obj):
|
|||
if datetime.datetime.utcnow() - heartbeat > datetime.timedelta(minutes=1):
|
||||
phase = database.BUILD_PHASE.INTERNAL_ERROR
|
||||
|
||||
# If the phase is internal error, return 'error' instead if the number of retries
|
||||
# on the queue item is 0.
|
||||
if phase == database.BUILD_PHASE.INTERNAL_ERROR:
|
||||
retry = (build_obj.queue_id and
|
||||
dockerfile_build_queue.has_retries_remaining(build_obj.queue_id))
|
||||
if not retry:
|
||||
phase = database.BUILD_PHASE.ERROR
|
||||
# If the phase is internal error, return 'expired' instead if the number of retries
|
||||
# on the queue item is 0.
|
||||
if phase == database.BUILD_PHASE.INTERNAL_ERROR:
|
||||
retry = (build_obj.queue_id and
|
||||
dockerfile_build_queue.has_retries_remaining(build_obj.queue_id))
|
||||
if not retry:
|
||||
phase = 'expired'
|
||||
|
||||
return (phase, status, error)
|
||||
|
||||
|
|
Reference in a new issue