ruby on rails - How do I kill job in Sidekiq took long to finish -


i have jobs take more 2h finish. want put time limit how long take it. how can do?

wrap logic timeout::timeout , disable retries if don't want job retried after timeout.

class runstoolongworker   include sidekiq::worker    sidekiq_options :retry => false    def perform(*args)     timeout::timeout(2.hours)       # possibly long running task     end   end end 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -