Sha256: 49e302ce442df719c06a334f5061eef30f07212acfcaca6943a212ac0a36ff61

Contents?: true

Size: 451 Bytes

Versions: 50

Compression:

Stored size: 451 Bytes

Contents

# frozen_string_literal: true

# Sleeps for specified number of seconds.
Puppet::Functions.create_function(:'ctrl::sleep') do
  # @param period Time to sleep (in seconds)
  # @example Sleep for 5 seconds
  #   ctrl::sleep(5)
  dispatch :sleeper do
    required_param 'Numeric', :period
    return_type 'Undef'
  end

  def sleeper(period)
    Puppet.lookup(:bolt_executor) {}&.report_function_call(self.class.name)
    sleep(period)
    nil
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
bolt-2.15.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-2.14.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-2.13.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-2.12.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-2.11.1 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-2.11.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-2.10.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-2.9.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-2.8.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-2.7.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-2.6.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-2.5.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-2.4.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-2.3.1 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-2.3.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-2.2.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-2.1.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-2.0.1 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-2.0.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-1.49.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb