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|
ActiveRecord::Base.clear_all_connections!
end
if Feature::FlipperFeature.table_exists? && Feature.enabled?(:gitlab_sidekiq_reliable_fetcher)
# By default we're going to use Semi Reliable Fetch
config.options[:semi_reliable_fetch] = Feature.enabled?(:gitlab_sidekiq_enable_semi_reliable_fetcher, default_enabled: true)
if enable_reliable_fetch?
config.options[:semi_reliable_fetch] = enable_semi_reliable_fetch_mode?
Sidekiq::ReliableFetch.setup_reliable_fetch!(config)
end
......@@ -90,3 +89,15 @@ 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
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