BigW Consortium Gitlab
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.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
gitlab/github_import | Loading commit data... | |
application_worker.rb | Loading commit data... | |
cluster_applications.rb | Loading commit data... | |
cluster_queue.rb | Loading commit data... | |
cronjob_queue.rb | Loading commit data... | |
exception_backtrace.rb | Loading commit data... | |
mail_scheduler_queue.rb | Loading commit data... | |
new_issuable.rb | Loading commit data... | |
object_storage_queue.rb | Loading commit data... | |
pipeline_background_queue.rb | Loading commit data... | |
pipeline_queue.rb | Loading commit data... | |
project_import_options.rb | Loading commit data... | |
project_start_import.rb | Loading commit data... | |
repository_check_queue.rb | Loading commit data... | |
waitable_worker.rb | Loading commit data... |