Method: Puppet::HTTP::Pool#active_entries
- Defined in:
- lib/puppet/http/pool.rb
#active_entries(site) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns an Array of entries whose connections are not expired.
144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/puppet/http/pool.rb', line 144 def active_entries(site) now = Time.now entries = @pool[site] || [] entries.select do |entry| if entry.expired?(now) close_connection(site, entry.connection) false else true end end end |