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-1.48.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-1.47.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-1.45.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-1.44.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-1.43.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-1.42.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-1.41.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-1.40.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-1.39.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-1.38.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-1.37.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-1.36.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-1.35.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-1.34.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-1.33.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-1.32.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-1.31.1 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-1.31.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-1.30.1 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-1.30.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb