Commit graph

9 commits

Author SHA1 Message Date
GitLab Bot
4c5468b408 Add latest changes from gitlab-org/gitlab@master 2020-06-24 15:08:50 +00:00
GitLab Bot
a8c82a6395 Add latest changes from gitlab-org/gitlab@master 2020-02-25 03:08:49 +00:00
GitLab Bot
76623c12c1 Add latest changes from gitlab-org/gitlab@master 2020-02-05 21:09:02 +00:00
GitLab Bot
e723867717 Add latest changes from gitlab-org/gitlab@master 2019-12-17 18:07:48 +00:00
Thong Kuah
d6b952ad3e
Add frozen_string_literal to spec/workers
Adds `# frozen_string_literal: true` to spec/workers ruby files
2019-04-01 13:35:22 -03:00
Peter Leitzen
8dd3dc182e Make ActionContorller::Parameters serializable for sidekiq jobs 2019-02-05 10:39:14 +00:00
blackst0ne
f40478fe19 Bump Ruby on Rails to 5.0.7.1
Fix the CVE-2018-16476 vulnerability.
2018-12-21 23:32:25 +11:00
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
Sean McGivern
2db218f8bf Send emails for issues due tomorrow
Also, refactor the mail sending slightly: instead of one worker sending all
emails, create a worker per project with issues due, which will send all emails
for that project.
2018-03-30 14:55:05 +01:00