class Burner::Library::Sleep
Arbitrarily put thread to sleep for X number of seconds
Note: this does not use Payload#registers
.
Attributes
seconds[R]
Public Class Methods
new(name: '', seconds: 0)
click to toggle source
Calls superclass method
Burner::Job::new
# File lib/burner/library/sleep.rb, line 18 def initialize(name: '', seconds: 0) super(name: name) @seconds = seconds.to_f freeze end
Public Instance Methods
perform(output, _payload)
click to toggle source
# File lib/burner/library/sleep.rb, line 26 def perform(output, _payload) output.detail("Going to sleep for #{seconds} second(s)") Kernel.sleep(seconds) end