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
path: root/lib
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-05-18 17:54:47 +0300
committerFilipa Lacerda <filipa@gitlab.com>2018-05-30 13:05:49 +0300
commitfee3fe72904e88d6480822ef307cffeea2c34d90 (patch)
treeb87c5d14584c8375bbb6e32a1dcdf49fde7c83de /lib
parent5e39c6d75d277920c02c4ad28e4f22be2aaa1458 (diff)
Merge branch 'memoize-database-version' into 'master'
Memoize Gitlab::Database.version See merge request gitlab-org/gitlab-ce!19021
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/database.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/database.rb b/lib/gitlab/database.rb
index 76501dd50e8..d49d055c3f2 100644
--- a/lib/gitlab/database.rb
+++ b/lib/gitlab/database.rb
@@ -43,7 +43,7 @@ module Gitlab
end
def self.version
- database_version.match(/\A(?:PostgreSQL |)([^\s]+).*\z/)[1]
+ @version ||= database_version.match(/\A(?:PostgreSQL |)([^\s]+).*\z/)[1]
end
def self.join_lateral_supported?