Skip to content

Support concurrency limiting for mailer jobs

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

The following discussion from !169220 (merged) should be addressed:

  • @schin1 started a discussion:

    @dgruzd I notice this does not work for ActionMailer::MailDeliveryJob/ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper at the moment since it does not include ApplicationWorker. But it is not a problem since we do not define concurrency limits for mailers (nor am I sure how do we even do it 😅 since we do not define those worker classes).

    All Gitlab-defined Sidekiq workers would extend ApplicationWorker so we are good here.

    I'll resolve this thread by opening a follow-up issue in the meantime.

Currently, mailers do not have concurrency limits configured. It is not trivial to configure like other GitLab-defined sidekiq workers which include ApplicationWorker.

To support concurrency limit for mailers, we need to

  • find an entrypoint to configure concurrency_limit -> { x } for the job wrapper
  • support calling .concurrency_limit_resume method which is defined in ApplicationWorker

References:

Edited by 🤖 GitLab Bot 🤖