while not all_jobs_finished
all_jobs_finished = true
@sub_jobs.each do |job|
+ job_status = job.status
# check status chanaged, if then print
- if job_status_map[ job.id ] != job.status then
- @log.info(" * Sub-Job \"#{job.get_project().name}(#{job.os})\" has entered \"#{job.status}\" state. (#{job.id})", Log::LV_USER)
- job_status_map[ job.id ] = job.status
+ if job_status_map[ job.id ] != job_status then
+ @log.info(" * Sub-Job \"#{job.get_project().name}(#{job.os})\" has entered \"#{job_status}\" state. (#{job.id})", Log::LV_USER)
+ job_status_map[ job.id ] = job_status
end
# check all jobs are finished
- if job.status != "ERROR" and job.status != "FINISHED" and job.status != "CANCELED" then
+ if job_status != "ERROR" and job_status != "FINISHED" and job_status != "CANCELED" then
all_jobs_finished = false
end
# check there is some error or cancel
if stop_status == "FINISHED" and
- (job.status == "ERROR" or job.status == "CANCELED") then
+ (job_status == "ERROR" or job_status == "CANCELED") then
# write url
write_log_url(job)
# cancel all other un-finished jobs
@sub_jobs.each do |sub|
- if sub.status != "ERROR" and sub.status != "FINISHED" and
- sub.status != "CANCELED" and sub.event == "NONE" then
+ sub_status = sub.status
+ if sub_status != "ERROR" and sub_status != "FINISHED" and
+ sub_status != "CANCELED" and sub.event == "NONE" then
@log.info(" * Sub-Job \"#{sub.get_project().name}(#{sub.os})\" has entered \"CANCELING\" state. (#{sub.id})", Log::LV_USER)
sub.event = "CANCEL"
end
end
- stop_status = job.status
+ stop_status = job_status
break
end
end