diff options
author | Rémy Coutable <remy@rymai.me> | 2018-02-05 13:04:43 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-02-05 13:04:43 +0300 |
commit | 4d64524b0dc26dadc58a01a1696d2198a05e21ee (patch) | |
tree | 930429bd79aee23ea3199c9fd146b83551ebdec4 /config | |
parent | 9f5537304bf30bbe7430cc0290df3acea035a428 (diff) | |
parent | cca61980d5ad9c4db65b9498fe49d936657bc0e2 (diff) |
Merge branch 'query-counts' into 'master'
Track and act upon the number of executed SQL queries
See merge request gitlab-org/gitlab-ce!16466
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/query_limiting.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/config/initializers/query_limiting.rb b/config/initializers/query_limiting.rb new file mode 100644 index 00000000000..66864d1898e --- /dev/null +++ b/config/initializers/query_limiting.rb @@ -0,0 +1,9 @@ +if Gitlab::QueryLimiting.enable? + require_dependency 'gitlab/query_limiting/active_support_subscriber' + require_dependency 'gitlab/query_limiting/transaction' + require_dependency 'gitlab/query_limiting/middleware' + + Gitlab::Application.configure do |config| + config.middleware.use(Gitlab::QueryLimiting::Middleware) + end +end |