- def deal_stats(job, level = 0)
- return 1 unless job['stats']
job_state 也需要纳入考虑。 job_state=fail 那就直接 level=has_error 了
- job['stats'].each do |key, value|
match_stats_filter(key, value, job['id'])
calculate_stat(key, value)
level = get_stat_level(key, level)
level应该取最高值 取到has_error就可以提前break了
- end
- return level
- end