summaryrefslogtreecommitdiff
path: root/app/models/issue_collection.rb
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-10-07 15:20:57 +0200
committerYorick Peterse <yorickpeterse@gmail.com>2016-11-07 13:11:44 +0100
commit509910b89f636f95d2d5a9cd3f38ce8f7f4f47a6 (patch)
treeb9f9c147a983aa6505d0d6a9a7e4a37f26a19161 /app/models/issue_collection.rb
parentf694f94c491452a50035c2ff43c8ba595c0e73aa (diff)
downloadgitlab-ce-509910b89f636f95d2d5a9cd3f38ce8f7f4f47a6.tar.gz
Process commits in a separate workerprocess-commits-using-sidekiq
This moves the code used for processing commits from GitPushService to its own Sidekiq worker: ProcessCommitWorker. Using a Sidekiq worker allows us to process multiple commits in parallel. This in turn will lead to issues being closed faster and cross references being created faster. Furthermore by isolating this code into a separate class it's easier to test and maintain the code. The new worker also ensures it can efficiently check which issues can be closed, without having to run numerous SQL queries for every issue.
Diffstat (limited to 'app/models/issue_collection.rb')
-rw-r--r--app/models/issue_collection.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/issue_collection.rb b/app/models/issue_collection.rb
index df36252a5b1..f0b7d9914c8 100644
--- a/app/models/issue_collection.rb
+++ b/app/models/issue_collection.rb
@@ -32,6 +32,8 @@ class IssueCollection
end
end
+ alias_method :visible_to, :updatable_by_user
+
private
def project_ids