Sha256: 7716969069f9dfbd12fd81f26c7759719f4d63b2e08c474ea9335b4169f515a4

Contents?: true

Size: 480 Bytes

Versions: 71

Compression:

Stored size: 480 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)
    # Send Analytics Report
    Puppet.lookup(:bolt_executor) {}&.report_function_call(self.class.name)

    sleep(period)
    nil
  end
end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
bolt-4.0.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-3.29.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-3.28.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-3.27.4 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-3.27.2 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-3.27.1 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-3.26.2 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-3.26.1 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-3.25.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-3.24.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-3.23.1 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-3.23.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-3.22.1 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-3.22.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-3.21.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-3.20.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-3.19.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-3.18.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-3.17.0 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb
bolt-3.16.1 bolt-modules/ctrl/lib/puppet/functions/ctrl/sleep.rb