Revision 81884922
Added by Craig Parker about 9 years ago
app/models/host/managed.rb | ||
---|---|---|
attr_reader :cached_host_params
|
||
|
||
scope :recent, lambda { |*args| {:conditions => ["last_report > ?", (args.first || (Setting[:puppet_interval] + 5).minutes.ago)]} }
|
||
scope :out_of_sync, lambda { |*args| {:conditions => ["last_report < ? and enabled != ?", (args.first || (Setting[:puppet_interval] + 5).minutes.ago), false]} }
|
||
scope :out_of_sync, lambda { |*args| {:conditions => ["last_report < ? and enabled != ?", (args.first || (Setting[:puppet_interval] + Setting[:outofsync_interval]).minutes.ago), false]} }
|
||
|
||
scope :with_os, lambda { where('hosts.operatingsystem_id IS NOT NULL') }
|
||
|
Also available in: Unified diff
Fixes #10337 - Added setting out of sync duration