CHips L MINI SHELL

CHips L pro

Current Path : /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/
Upload File :
Current File : //opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/splayer.rb

# Handle splay options (sleeping for a random interval before executing)
module Puppet::Util::Splayer
  # Have we splayed already?
  def splayed?
    !!@splayed
  end

  # Sleep when splay is enabled; else just return.
  def splay(do_splay = Puppet[:splay])
    return unless do_splay
    return if splayed?

    time = rand(Puppet[:splaylimit] + 1)
    Puppet.info _("Sleeping for %{time} seconds (splay is enabled)") % { time: time }
    sleep(time)
    @splayed = true
  end
end

Copyright 2K16 - 2K18 Indonesian Hacker Rulez