gitlab-org--gitlab-foss/app/workers/concerns
Sean McGivern b5042e5301 Move NotificationService calls to Sidekiq
The NotificationService has to do quite a lot of work to calculate the
recipients for an email. Where possible, we should try to avoid doing this in an
HTTP request, because the mail are sent by Sidekiq anyway, so there's no need to
schedule those emails immediately.

This commit creates a generic Sidekiq worker that uses Global ID to serialise
and deserialise its arguments, then forwards them to the NotificationService.
The NotificationService gains an `#async` method, so you can replace:

    notification_service.new_issue(issue, current_user)

With:

    notification_service.async.new_issue(issue, current_user)

And have everything else work as normal, except that calculating the recipients
will be done by Sidekiq, which will then schedule further Sidekiq jobs to send
each email.
2018-04-25 12:48:14 +01:00
..
gitlab/github_import Replace deprecated path_with_namespace with full_path 2018-03-05 15:41:54 +02:00
application_worker.rb Add rubocops to ensure Sidekiq workers include ApplicationWorker and don't manually set their queue 2017-12-13 16:28:26 +01:00
cluster_applications.rb
cluster_queue.rb Use a dedicated queue for each worker 2017-12-12 17:36:20 +01:00
cronjob_queue.rb Use a dedicated queue for each worker 2017-12-12 17:36:20 +01:00
exception_backtrace.rb
mail_scheduler_queue.rb Move NotificationService calls to Sidekiq 2018-04-25 12:48:14 +01:00
new_issuable.rb
object_storage_queue.rb another round of fixes 2018-03-01 10:36:24 -05:00
pipeline_background_queue.rb Integrate two workers into one ArchiveTraceWorker with pipeline_background queue. This queue takes loqer precedence than pipeline_default. 2018-03-06 21:44:15 +09:00
pipeline_queue.rb Use a dedicated queue for each worker 2017-12-12 17:36:20 +01:00
project_import_options.rb Remove warning noise in ProjectImportOptions 2018-01-11 13:03:26 -08:00
project_start_import.rb Fork and Import jobs only get marked as failed when the number of Sidekiq retries were exhausted 2017-12-15 09:54:10 +00:00
repository_check_queue.rb Use a dedicated queue for each worker 2017-12-12 17:36:20 +01:00
waitable_worker.rb Allow bulk_perform_and_wait wait timeout to be overridden 2018-02-26 13:34:41 +01:00