diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-18 13:50:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-18 13:50:51 +0300 |
commit | db384e6b19af03b4c3c82a5760d83a3fd79f7982 (patch) | |
tree | 34beaef37df5f47ccbcf5729d7583aae093cffa0 /config/settings.rb | |
parent | 54fd7b1bad233e3944434da91d257fa7f63c3996 (diff) |
Add latest changes from gitlab-org/gitlab@16-3-stable-eev16.3.0-rc42
Diffstat (limited to 'config/settings.rb')
-rw-r--r-- | config/settings.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/config/settings.rb b/config/settings.rb index c25531a3311..3edbcc9b5ed 100644 --- a/config/settings.rb +++ b/config/settings.rb @@ -5,6 +5,8 @@ require_relative '../lib/gitlab_settings' file = ENV.fetch('GITLAB_CONFIG') { Rails.root.join('config/gitlab.yml') } section = ENV.fetch('GITLAB_ENV') { Rails.env } +GITLAB_INSTANCE_UUID_NOT_SET = 'uuid-not-set' + Settings = GitlabSettings.load(file, section) do def gitlab_on_standard_port? on_standard_port?(gitlab) @@ -212,7 +214,7 @@ Settings = GitlabSettings.load(file, section) do # these pings. The sidekiq job handles temporary http failures. def cron_for_service_ping # Set a default UUID for the case when the UUID hasn't been initialized. - uuid = Gitlab::CurrentSettings.uuid || 'uuid-not-set' + uuid = Gitlab::CurrentSettings.uuid || GITLAB_INSTANCE_UUID_NOT_SET minute = Digest::SHA256.hexdigest(uuid + 'minute').to_i(16) % 60 hour = Digest::SHA256.hexdigest(uuid + 'hour').to_i(16) % 24 |