#245: rollback some changes of BuildListObserver

This commit is contained in:
Vokhmin Alexey V 2013-07-31 17:29:17 +04:00
parent b69a238a3a
commit b5e22bb5db
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ class BuildListObserver < ActiveRecord::Observer
end end
build_count = statistic.build_count build_count = statistic.build_count
new_av_time = ( statistic.average_build_time * build_count + record.duration ) / ( build_count + 1 ) new_av_time = ( statistic.average_build_time * build_count + record.duration ) / ( build_count + 1 )
statistic.update_attributes(:average_build_time => new_av_time, :build_count => build_count) statistic.update_attributes(:average_build_time => new_av_time, :build_count => build_count + 1)
end end
end end
end end