Commit 0ddc0a3f authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch '10327-enable-reliable-fetcher-by-default' into 'master'

Enable Reliable fetcher by default

Closes gitlab-ee#10327

See merge request gitlab-org/gitlab-ce!27530
parents 9c39e328 e83084fb
---
title: Enable Sidekiq Reliable Fetcher for background jobs by default
merge_request: 27530
author:
type: added
...@@ -45,9 +45,8 @@ Sidekiq.configure_server do |config| ...@@ -45,9 +45,8 @@ Sidekiq.configure_server do |config|
ActiveRecord::Base.clear_all_connections! ActiveRecord::Base.clear_all_connections!
end end
if Feature::FlipperFeature.table_exists? && Feature.enabled?(:gitlab_sidekiq_reliable_fetcher) if enable_reliable_fetch?
# By default we're going to use Semi Reliable Fetch config.options[:semi_reliable_fetch] = enable_semi_reliable_fetch_mode?
config.options[:semi_reliable_fetch] = Feature.enabled?(:gitlab_sidekiq_enable_semi_reliable_fetcher, default_enabled: true)
Sidekiq::ReliableFetch.setup_reliable_fetch!(config) Sidekiq::ReliableFetch.setup_reliable_fetch!(config)
end end
...@@ -90,3 +89,15 @@ Sidekiq.configure_client do |config| ...@@ -90,3 +89,15 @@ Sidekiq.configure_client do |config|
chain.add Gitlab::SidekiqStatus::ClientMiddleware chain.add Gitlab::SidekiqStatus::ClientMiddleware
end end
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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment