Skip to content

Remove confusing retry option for cronjob workers [RUN AS-IF-FOSS]

Sean McGivern requested to merge remove-retry-option-from-cron-jobs into master

In !59907 (merged) we explicitly set the number of retries for all existing workers to 3. However, this included workers that use CronjobQueue, where retries are disabled, which was confusing. We were essentially doing:

class MyWorker
  include ApplicationWorker

  sidekiq_options retry: 3 # In the worker class
  include CronjobQueue # Which does ...
  sidekiq_options retry: false # ... and this takes precedence
end

This change simply removes retry: 3 from all workers that include the CronjobQueue. Done with:

ag -l 'retry: 3' app/workers/ ee/app/workers/ |
  xargs ag -l CronjobQueue |
  xargs -L1 sed -z -i'' 's/\n *sidekiq_options retry: 3\n/\n/g'

But other file searching and editing tools are available too.

See ab0f9788 (comment 633075830)

Edited by Sean McGivern

Merge request reports