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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-07 03:07:50 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-07 03:07:50 +0300
commitd95abc0bc994436aa963347bed29e264d5158fa5 (patch)
treefe2aab72e133e2913cba0959efd88fdb75669b91 /app/controllers/projects/error_tracking
parent015663b70f1bcdae4483e38c2beac884f92da5b8 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/projects/error_tracking')
-rw-r--r--app/controllers/projects/error_tracking/base_controller.rb9
-rw-r--r--app/controllers/projects/error_tracking/stack_traces_controller.rb4
2 files changed, 11 insertions, 2 deletions
diff --git a/app/controllers/projects/error_tracking/base_controller.rb b/app/controllers/projects/error_tracking/base_controller.rb
new file mode 100644
index 00000000000..6efc6d00702
--- /dev/null
+++ b/app/controllers/projects/error_tracking/base_controller.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class Projects::ErrorTracking::BaseController < Projects::ApplicationController
+ POLLING_INTERVAL = 1_000
+
+ def set_polling_interval
+ Gitlab::PollingInterval.set_header(response, interval: POLLING_INTERVAL)
+ end
+end
diff --git a/app/controllers/projects/error_tracking/stack_traces_controller.rb b/app/controllers/projects/error_tracking/stack_traces_controller.rb
index 3b553752d26..c5d5d6da6a6 100644
--- a/app/controllers/projects/error_tracking/stack_traces_controller.rb
+++ b/app/controllers/projects/error_tracking/stack_traces_controller.rb
@@ -2,10 +2,10 @@
module Projects
module ErrorTracking
- class StackTracesController < Projects::ApplicationController
+ class StackTracesController < Projects::ErrorTracking::BaseController
respond_to :json
- before_action :authorize_read_sentry_issue!
+ before_action :authorize_read_sentry_issue!, :set_polling_interval
def index
result = fetch_latest_event_issue