lib/chef-workflow/support/scheduler.rb
#
# Helper method for scheduling. Wraps items in a timeout and immediately
# checks all running workers for exceptions, which are immediately bubbled up
# if there are any. If do_loop is true, it will retry the timeout.
#
Helper method for scheduling. Wraps items in a timeout and immediately
checks all running workers for exceptions, which are immediately bubbled up
if there are any. If do_loop is true, it will retry the timeout.
Helper method for scheduling . Wraps items in a timeout and immediately checks all running workers for exceptions which are immediately bubbled up if there are any . If do_loop is true it will retry the timeout .
def with_timeout(do_loop=true)
    Timeout.timeout(10) do
      if @working.values.reject(&:alive?).size > 0
        @working.select { |k,v| !v.alive? }.values.map(&:join)
      end
      yield
    end
  rescue TimeoutError
    retry if do_loop
  end
def with_timeout ( do_loop = true ) Timeout . timeout ( 10 ) do if @working . values . reject ( & :alive? ) . size > 0 @working . select { | k , v | ! v . alive? } . values . map ( & :join ) end yield end rescue TimeoutError retry if do_loop end
Helper method for scheduling.
Helper method for scheduling .
do_loop
<not_specific>