Skip to content

Instantly share code, notes, and snippets.

@ahpook
Created November 24, 2015 01:08
Show Gist options
  • Save ahpook/ccd01cdf027ff2276747 to your computer and use it in GitHub Desktop.
Save ahpook/ccd01cdf027ff2276747 to your computer and use it in GitHub Desktop.
wat
From: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/splayer.rb @ line 12 Puppet::Util::Splayer#splay:
10: def splay(do_splay = Puppet[:splay])
11: # return unless do_splay
=> 12: binding.pry
13: return if splayed?
14:
15: time = rand(Puppet[:splaylimit] + 1)
16: Puppet.info "Sleeping for #{time} seconds (splay is enabled)"
17: sleep(time)
18: @splayed = true
19: end
[1] pry(#<Puppet::Agent>)> do_splay
=> false
[2] pry(#<Puppet::Agent>)> Puppet[:splay]
=> true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment