Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgfyoung <gfyoung17@gmail.com>2018-11-20 05:01:13 +0300
committergfyoung <gfyoung17@gmail.com>2018-11-20 05:24:22 +0300
commitf93f8f569d51cdc738d1653a264a762b2c08fde0 (patch)
tree63883b10e0e618b730bc2859a62ce840611846e0 /lib/gitlab/query_limiting
parent60261d9d3cbad16f9846b01c994e7575430184d9 (diff)
Enable even more frozen string for lib/gitlab
Enables frozen string for the following: * lib/gitlab/patch/**/*.rb * lib/gitlab/popen/**/*.rb * lib/gitlab/profiler/**/*.rb * lib/gitlab/project_authorizations/**/*.rb * lib/gitlab/prometheus/**/*.rb * lib/gitlab/query_limiting/**/*.rb * lib/gitlab/quick_actions/**/*.rb * lib/gitlab/redis/**/*.rb * lib/gitlab/request_profiler/**/*.rb * lib/gitlab/search/**/*.rb * lib/gitlab/sherlock/**/*.rb * lib/gitlab/sidekiq_middleware/**/*.rb * lib/gitlab/slash_commands/**/*.rb * lib/gitlab/sql/**/*.rb * lib/gitlab/template/**/*.rb * lib/gitlab/testing/**/*.rb * lib/gitlab/utils/**/*.rb * lib/gitlab/webpack/**/*.rb Partially addresses gitlab-org/gitlab-ce#47424.
Diffstat (limited to 'lib/gitlab/query_limiting')
-rw-r--r--lib/gitlab/query_limiting/active_support_subscriber.rb2
-rw-r--r--lib/gitlab/query_limiting/transaction.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/query_limiting/active_support_subscriber.rb b/lib/gitlab/query_limiting/active_support_subscriber.rb
index 3c4ff5d1928..065862174bb 100644
--- a/lib/gitlab/query_limiting/active_support_subscriber.rb
+++ b/lib/gitlab/query_limiting/active_support_subscriber.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Gitlab
module QueryLimiting
class ActiveSupportSubscriber < ActiveSupport::Subscriber
diff --git a/lib/gitlab/query_limiting/transaction.rb b/lib/gitlab/query_limiting/transaction.rb
index 66d7d9275cf..e8fad067fa6 100644
--- a/lib/gitlab/query_limiting/transaction.rb
+++ b/lib/gitlab/query_limiting/transaction.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Gitlab
module QueryLimiting
class Transaction
@@ -68,7 +70,7 @@ module Gitlab
def error_message
header = 'Too many SQL queries were executed'
- header += " in #{action}" if action
+ header = "#{header} in #{action}" if action
"#{header}: a maximum of #{THRESHOLD} is allowed but #{count} SQL queries were executed"
end