summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorReuben Pereira <rpereira@gitlab.com>2019-08-07 18:40:36 +0000
committerStan Hu <stanhu@gmail.com>2019-08-07 18:40:36 +0000
commitaf4a597d3fb687ed2841bb755403f66cf131bdff (patch)
tree45b6188b5a67d4372b4073c41a420119d6300a89 /lib
parentd02003cf951692cc243b7ee512de2139e99f0c4c (diff)
downloadgitlab-ce-af4a597d3fb687ed2841bb755403f66cf131bdff.tar.gz
Save instance administration project id in DB
- This will make it easy to identify the project even if admins change the name of the project or move it.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/current_settings.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gitlab/current_settings.rb b/lib/gitlab/current_settings.rb
index 32d5e4b9ea3..6ce47650562 100644
--- a/lib/gitlab/current_settings.rb
+++ b/lib/gitlab/current_settings.rb
@@ -7,6 +7,11 @@ module Gitlab
Gitlab::SafeRequestStore.fetch(:current_application_settings) { ensure_application_settings! }
end
+ def expire_current_application_settings
+ ::ApplicationSetting.expire
+ Gitlab::SafeRequestStore.delete(:current_application_settings)
+ end
+
def clear_in_memory_application_settings!
@in_memory_application_settings = nil
end