back

by nate·8y ago·view on hn ↗
Hello. No apologies necessary! Wanted to put this out there for the discussion. So thanks for the comment. I'm not sure what you mean though. This is polling to see if the jobs are completed. Every two seconds it goes and polls the status of each of the Jobs that were kicked off.

  Timeout::timeout(15 * 60) do 
    while(!all_job_statuses_complete?(all_jobs)) do 
      sleep 2
    end
  end
Was there something else you were referring to?
1 comments
Timeout::timeout has many very sharp edges you should be aware of before you use in this context.
Very true. Could just as easily just count the number of times we've looped through this and multiply by our sleep to get a sense of time taken place. Thanks for the poke at that!