mirror of
https://github.com/philippdieter/puppet-ldapquery.git
synced 2025-10-13 12:55:48 +00:00
Increase granularity
This commit is contained in:
parent
a3ce58dc85
commit
9969f16a60
@ -72,7 +72,7 @@ module PuppetX
|
|||||||
|
|
||||||
conf = self.get_config()
|
conf = self.get_config()
|
||||||
|
|
||||||
start_time = Time.now.to_i
|
start_time = Time.now
|
||||||
ldap = Net::LDAP.new(conf)
|
ldap = Net::LDAP.new(conf)
|
||||||
ldapfilter = Net::LDAP::Filter.construct(@filter)
|
ldapfilter = Net::LDAP::Filter.construct(@filter)
|
||||||
|
|
||||||
@ -85,8 +85,10 @@ module PuppetX
|
|||||||
:time => 10) do |entry|
|
:time => 10) do |entry|
|
||||||
entries << entry
|
entries << entry
|
||||||
end
|
end
|
||||||
end_time = Time.now.to_i
|
end_time = Time.now
|
||||||
Puppet.debug("Searching #{@base} for #{@attributes} using #{@filter} took #{end_time - start_time} seconds")
|
time_delta = sprintf('%.3f', end_time - start_time)
|
||||||
|
|
||||||
|
Puppet.debug("Searching #{@base} for #{@attributes} using #{@filter} took #{time_delta} seconds")
|
||||||
return entries
|
return entries
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
Puppet.debug('There was an error searching LDAP #{e.message}')
|
Puppet.debug('There was an error searching LDAP #{e.message}')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user