summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-08-21 13:32:50 -0700
committerStan Hu <stanhu@gmail.com>2018-08-21 13:39:02 -0700
commit377e3670a9aa2ca1419232d75b060cfccc58c7ef (patch)
tree24a4a01c29bc3dcb3caaf214114dbfc90e9ade9e /app/services
parent382b6dabd96e8966386729d82854b899ad4ce894 (diff)
downloadgitlab-ce-377e3670a9aa2ca1419232d75b060cfccc58c7ef.tar.gz
Eliminate unnecessary and duplicate system hook fires
Previously `SystemHookPushWorker` would always be called after a push event, and this would queue a Sidekiq job regardless of whether any system hooks needed that event. Moreover, another call inside `Project#execute_hooks` would also fire system hooks if they existed. This change both removes the duplicate system hook calls. For installations without system hooks for push events, this change also can save significant amount of RAM used by Redis. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/50549
Diffstat (limited to 'app/services')
-rw-r--r--app/services/git_push_service.rb1
1 files changed, 0 insertions, 1 deletions
diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb
index 637c1df4ad9..156b4b3c6ec 100644
--- a/app/services/git_push_service.rb
+++ b/app/services/git_push_service.rb
@@ -140,7 +140,6 @@ class GitPushService < BaseService
EventCreateService.new.push(project, current_user, build_push_data)
Ci::CreatePipelineService.new(project, current_user, build_push_data).execute(:push)
- SystemHookPushWorker.perform_async(build_push_data.dup, :push_hooks)
project.execute_hooks(build_push_data.dup, :push_hooks)
project.execute_services(build_push_data.dup, :push_hooks)