Sha256: e8f95c696eafe3daa8609ee7ba0ce78a594df0160488d457a0b3f9340b8eaa9b
Contents?: true
Size: 462 Bytes
Versions: 155
Compression:
Stored size: 462 Bytes
Contents
# 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)" sleep(time) @splayed = true end end
Version data entries
155 entries across 155 versions & 2 rubygems