diff options
author | Adam S <asa188@sfu.ca> | 2015-09-25 17:58:05 -0700 |
---|---|---|
committer | Adam S <asa188@sfu.ca> | 2015-09-25 18:06:00 -0700 |
commit | 440245d40d90f5f5cd9d7db0131371969216e55c (patch) | |
tree | b4a9c1f5a202d76393522036bca87a8e225d332a /lib | |
parent | 4d1bca3359519e6303d9b3543c56426606c8eba3 (diff) |
fixup-PR#506 Speed improvements in facter resolution
This is to improve speed on Facter resolution of service_provider fact
that was just introduced in PR# 506. The improvements go from 280ms
resolution time approx. down to 2ms resolution time approx. by adding
requires statements.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/facter/service_provider.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/facter/service_provider.rb b/lib/facter/service_provider.rb index 54db937..a117921 100644 --- a/lib/facter/service_provider.rb +++ b/lib/facter/service_provider.rb @@ -7,6 +7,9 @@ # # Caveats: # +require 'puppet/type' +require 'puppet/type/service' + Facter.add(:service_provider) do setcode do Puppet::Type.type(:service).newservice(:name => 'dummy')[:provider].to_s |