• Sean McGivern's avatar
    Remove confusing retry option for cronjob workers · 26b34c2a
    Sean McGivern authored
    In https://gitlab.com/gitlab-org/gitlab/-/merge_requests/59907 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.
    26b34c2a
batch_worker.rb 975 Bytes