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
Post a Comment