Welcome to mirror list, hosted at ThFree Co, Russian Federation.

002_sidekiq.rb « initializers_before_autoloader « config - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4ce9127a45d72ef69ddb6cf3512f55a0de7ab5ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

# Preloads Sidekiq configurations that don't require application references.
#
# It ensures default settings are loaded before any other file references
# (directly or indirectly) Sidekiq workers.
#

require 'sidekiq/web'

# 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

# Default is to retry 25 times with exponential backoff. That's too much.
Sidekiq.default_worker_options = { retry: 3 }

if Rails.env.development?
  Sidekiq.default_worker_options[:backtrace] = true
end