gitlab-org--gitlab-foss/app/services/issues
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
..
base_service.rb Refactor the way we pass old associations to issuable's update services 2017-11-24 13:08:25 +01:00
build_service.rb Refactor resolvability checks based on type 2017-04-06 10:51:45 -05:00
close_service.rb Move NotificationService calls to Sidekiq 2018-04-25 12:48:14 +01:00
create_service.rb Cache the number of open issues and merge requests 2017-08-23 13:42:29 +02:00
duplicate_service.rb Move duplicate issue management to a service 2017-07-21 12:53:56 +01:00
fetch_referenced_merge_requests_service.rb Change issue show page to group MRs by projects and namespaces 2018-02-13 07:47:09 -06:00
move_service.rb Move NotificationService calls to Sidekiq 2018-04-25 12:48:14 +01:00
reopen_service.rb Move NotificationService calls to Sidekiq 2018-04-25 12:48:14 +01:00
update_service.rb Move NotificationService calls to Sidekiq 2018-04-25 12:48:14 +01:00