summaryrefslogtreecommitdiff
path: root/app/workers
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2018-04-17 12:44:45 +0100
committerSean McGivern <sean@gitlab.com>2018-04-17 13:59:46 +0100
commitab650e7c6753d2f4c418496ad74dc87e243a5b2b (patch)
tree0d336105ec85f0f32f5b112b9149a6891b538d40 /app/workers
parentfd4a08203448d5ade7471549fe17169fb19c6484 (diff)
downloadgitlab-ce-ab650e7c6753d2f4c418496ad74dc87e243a5b2b.tar.gz
Use `bulk_perform_async` to schedule issue due emails
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/issue_due_scheduler_worker.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/workers/issue_due_scheduler_worker.rb b/app/workers/issue_due_scheduler_worker.rb
index 9c06304bff6..16ab5d069e0 100644
--- a/app/workers/issue_due_scheduler_worker.rb
+++ b/app/workers/issue_due_scheduler_worker.rb
@@ -3,8 +3,8 @@ class IssueDueSchedulerWorker
include CronjobQueue
def perform
- Issue.opened.due_tomorrow.group(:project_id).pluck(:project_id).each do |project_id|
- MailScheduler::IssueDueWorker.perform_async(project_id)
- end
+ project_ids = Issue.opened.due_tomorrow.group(:project_id).pluck(:project_id).map { |id| [id] }
+
+ MailScheduler::IssueDueWorker.bulk_perform_async(project_ids)
end
end