sidekiq

Disable automatic retry with ActiveJob, used with Sidekiq

痴心易碎 提交于 2020-07-17 03:29:14
问题 Is there a way to disable automatic retry with ActiveJob and Sidekiq ? I know that with Sidekiq only, we just have to put sidekiq_options :retry => false as mentioned here : https://github.com/mperham/sidekiq/wiki/Error-Handling#configuration but it doesn't seem to work with ActiveJob and Sidekiq. I also know the solution to entierly disable the retry as proposed here : https://stackoverflow.com/a/28216822/2431728 But it's not the behavior I need. 回答1: Ok thanks for the answer. Just for

Disable automatic retry with ActiveJob, used with Sidekiq

只谈情不闲聊 提交于 2020-07-17 03:28:44
问题 Is there a way to disable automatic retry with ActiveJob and Sidekiq ? I know that with Sidekiq only, we just have to put sidekiq_options :retry => false as mentioned here : https://github.com/mperham/sidekiq/wiki/Error-Handling#configuration but it doesn't seem to work with ActiveJob and Sidekiq. I also know the solution to entierly disable the retry as proposed here : https://stackoverflow.com/a/28216822/2431728 But it's not the behavior I need. 回答1: Ok thanks for the answer. Just for

How to delete Sidekiq Enterprise periodic jobs?

十年热恋 提交于 2020-07-11 04:34:39
问题 Sidekiq Enterprise includes support for Periodic Jobs and includes an example of using the initializer to register jobs: Sidekiq.configure_server do |config| config.periodic do |mgr| # see any crontab reference for the first argument # e.g. http://www.adminschoice.com/crontab-quick-reference mgr.register('0 * * * *', SomeHourlyWorkerClass) mgr.register('* * * * *', SomeWorkerClass, retry: 2, queue: 'foo') mgr.register(cron_expression, worker_class, job_options={}) end end After registering a

Catch exception but do retry with Sidekiq

半腔热情 提交于 2020-05-29 04:17:51
问题 By default sidekiq will retry any jobs that throw an exception. That is fine. However, I want to be able to catch that exception so that my exception handler doesn't get notified, and then retry the job. How do I accomplish this in react? So my code looks like this: def perform ... rescue ExcClass => ex # log end But I want to actually retry that job. 回答1: Configure your error service client to ignore ExcClass. Sidekiq will retry, you don't get error reports. 回答2: If I'm following your