diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-23 15:09:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-23 15:09:33 +0300 |
commit | b38fc20ae0e90d5b1c538a139aa0a7da1b7b5726 (patch) | |
tree | 3ce77cdb707b75c9d74c6ff2a8386dd06bd48b44 /lib/gitlab/ci/trace.rb | |
parent | b3647b2a67930e8aa3c1b1dd9bda29c368c862ba (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/ci/trace.rb')
-rw-r--r-- | lib/gitlab/ci/trace.rb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/gitlab/ci/trace.rb b/lib/gitlab/ci/trace.rb index 3258d965c93..a177f56f434 100644 --- a/lib/gitlab/ci/trace.rb +++ b/lib/gitlab/ci/trace.rb @@ -11,7 +11,8 @@ module Gitlab LOCK_SLEEP = 0.001.seconds WATCH_FLAG_TTL = 10.seconds - UPDATE_FREQUENCY_DEFAULT = 30.seconds + LEGACY_UPDATE_FREQUENCY_DEFAULT = 30.seconds + UPDATE_FREQUENCY_DEFAULT = 60.seconds UPDATE_FREQUENCY_WHEN_BEING_WATCHED = 3.seconds ArchiveError = Class.new(StandardError) @@ -114,7 +115,15 @@ module Gitlab end def update_interval - being_watched? ? UPDATE_FREQUENCY_WHEN_BEING_WATCHED : UPDATE_FREQUENCY_DEFAULT + if being_watched? + UPDATE_FREQUENCY_WHEN_BEING_WATCHED + else + if Feature.enabled?(:ci_lower_frequency_trace_update, job.project, default_enabled: :yaml) + UPDATE_FREQUENCY_DEFAULT + else + LEGACY_UPDATE_FREQUENCY_DEFAULT + end + end end def being_watched! |