Revision 515fddce
Added by Shimon Shtein about 9 years ago
lib/tasks/fix_cached_counters.rake | ||
---|---|---|
task :fix_cached_counters => :environment do
|
||
puts "Correcting cached counters: (this may take a few minutes)"
|
||
[ Architecture, Environment, Operatingsystem, Domain, Realm].each do |cl|
|
||
cl.all.each{|el| cl.reset_counters(el.id, :hosts, :hostgroups)}
|
||
cl.unscoped.all.each{|el| cl.reset_counters(el.id, :hosts, :hostgroups)}
|
||
puts "#{cl} corrected"
|
||
end
|
||
Puppetclass.all.each{|el| Puppetclass.reset_counters(el.id, :hostgroup_classes, :lookup_keys)}
|
Also available in: Unified diff
Fixes #9339 - Changed the OS sorting to title
Title uses the full string, not only the name part.
(cherry picked from commit 61b5da1bb089a313375ef232e2643b0cd422bf92)