for each_sr_status_id in multi_sr_status_id:
print '[%s] each_sr_status_id(%s)\n' % (__file__, each_sr_status_id)
+ if each_sr_status_id == 0:
+ print 'each_sr_status_id is zero!! skip updating the sr_stage\n'
+ break
+
### [POST_IMAGE] stage : update fail status for [post] image creation
info_stage_id = POST_IMAGE
query = "UPDATE sr_stage SET stage_start_time = %s, stage_end_time = %s, stage_status = %s " \
isFailed = 0
for each_build_image_status in multi_build_image_status:
#print '[%s] each_build_image_status(%s)\n' % (__file__, each_build_image_status)
- if each_build_image_status[0] == 'F':
+ if each_build_image_status and each_build_image_status[0] == 'F':
isFailed = 1
print '[%s] isFailed(%s)!! skip updating the sr_stage\n' % (__file__, isFailed)
isFailed = 0
for each_build_image_status in multi_build_image_status:
#print '[%s] each_build_image_status(%s)\n' % (__file__, each_build_image_status)
- if each_build_image_status[0] == 'F':
+ if each_build_image_status and each_build_image_status[0] == 'F':
isFailed = 1
print '[%s] isFailed(%s)!! skip updating the sr_stage\n' % (__file__, isFailed)
for each_sr_status_id in multi_sr_status_id:
print '[%s] each_sr_status_id(%s)\n' % (__file__, each_sr_status_id)
+ if each_sr_status_id == 0:
+ print 'each_sr_status_id is zero!! skip updating the sr_stage\n'
+ break
+
info_stage_id = POST_SNAP
query = "UPDATE sr_stage SET stage_end_time = %s, stage_status = %s " \
"WHERE sr_status_id = %s AND info_stage_id = %s AND build_project_id = %s"
for each_sr_status_id in multi_sr_status_id:
print '[%s] each_sr_status_id(%s)\n' % (__file__, each_sr_status_id)
+ if each_sr_status_id == 0:
+ print 'each_sr_status_id is zero!! skip updating the sr_stage\n'
+ break
+
### [POST_SNAP] stage end : update 'S' status
info_stage_id = POST_SNAP
query = "UPDATE sr_stage SET stage_end_time = NOW(), stage_status = %s " \
for each_sr_status_id in multi_sr_status_id:
print '[%s] each_sr_status_id(%s)\n' % (__file__, each_sr_status_id)
+ if each_sr_status_id == 0:
+ print 'each_sr_status_id is zero!! skip updating the sr_stage\n'
+ break
+
### [POST_SNAP] stage end : update 'F' status
info_stage_id = POST_SNAP
query = "UPDATE sr_stage SET stage_end_time = NOW(), stage_status = %s " \
### [POST_BUILD] end / [POST_SNAP/POST_IMAGE] start : [post] snapshot creation
for each_sr_status_id in multi_sr_status_id:
print '[%s] each_sr_status_id(%s)\n' % (__file__, each_sr_status_id)
+
+ if each_sr_status_id == 0:
+ print 'each_sr_status_id is zero!! skip updating the sr_stage\n'
+ break
+
info_stage_id = POST_BUILD
bm_end_datetime = datetime.now()
query = "UPDATE sr_stage SET stage_end_time = %s, stage_status = %s " \
for each_sr_status_id in multi_sr_status_id:
print '[%s] each_sr_status_id(%s)\n' % (__file__, each_sr_status_id)
+ if each_sr_status_id == 0:
+ print 'each_sr_status_id is zero!! skip updating the sr_stage\n'
+ break
+
### [POST_SNAP] stage end : update 'S' status
sr_stage_status = 'S'
info_stage_id = POST_SNAP
isFailed = 0
for each_build_image_status in multi_build_image_status:
#print '[%s] each_build_image_status(%s)\n' % (__file__, each_build_image_status)
- if each_build_image_status[0] == 'F':
+ if each_build_image_status and each_build_image_status[0] == 'F':
isFailed = 1
print '[%s] isFailed(%s)!! skip updating the sr_stage\n' % (__file__, isFailed)