summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2019-04-25 21:13:52 +0300
committerValery Sizov <valery@gitlab.com>2019-04-25 21:13:52 +0300
commit460442032c5281a98502926ce4db7f5d6fe3b4b6 (patch)
tree0c7de2a8c202eaa26f0404822b9aae0f68a05225 /config
parent0ddc0a3f7f5b44e150c0b235fb4838c4f3f56e66 (diff)
downloadgitlab-ce-460442032c5281a98502926ce4db7f5d6fe3b4b6.tar.gz
Fix Sidekiq initializer file
Diffstat (limited to 'config')
-rw-r--r--config/initializers/sidekiq.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb
index 19ff36d217f..7b69cf11288 100644
--- a/config/initializers/sidekiq.rb
+++ b/config/initializers/sidekiq.rb
@@ -1,5 +1,17 @@
require 'sidekiq/web'
+def enable_reliable_fetch?
+ return true unless Feature::FlipperFeature.table_exists?
+
+ Feature.enabled?(:gitlab_sidekiq_reliable_fetcher, default_enabled: true)
+end
+
+def enable_semi_reliable_fetch_mode?
+ return true unless Feature::FlipperFeature.table_exists?
+
+ Feature.enabled?(:gitlab_sidekiq_enable_semi_reliable_fetcher, default_enabled: true)
+end
+
# Disable the Sidekiq Rack session since GitLab already has its own session store.
# CSRF protection still works (https://github.com/mperham/sidekiq/commit/315504e766c4fd88a29b7772169060afc4c40329).
Sidekiq::Web.set :sessions, false
@@ -89,15 +101,3 @@ Sidekiq.configure_client do |config|
chain.add Gitlab::SidekiqStatus::ClientMiddleware
end
end
-
-def enable_reliable_fetch?
- return true unless Feature::FlipperFeature.table_exists?
-
- Feature.enabled?(:gitlab_sidekiq_reliable_fetcher, default_enabled: true)
-end
-
-def enable_semi_reliable_fetch_mode?
- return true unless Feature::FlipperFeature.table_exists?
-
- Feature.enabled?(:gitlab_sidekiq_enable_semi_reliable_fetcher, default_enabled: true)
-end