gearheads
/
mastodon
Archived
2
0
Fork 0
This repository has been archived on 2024-06-09. You can view files and clone it, but cannot push or open issues/pull-requests.
mastodon/config/initializers/sidekiq.rb

40 lines
978 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require_relative '../../lib/mastodon/sidekiq_middleware'
2021-12-27 00:47:20 +01:00
Sidekiq.configure_server do |config|
config.redis = REDIS_SIDEKIQ_PARAMS
config.server_middleware do |chain|
chain.add Mastodon::SidekiqMiddleware
end
config.server_middleware do |chain|
chain.add SidekiqUniqueJobs::Middleware::Server
end
config.client_middleware do |chain|
chain.add SidekiqUniqueJobs::Middleware::Client
end
SidekiqUniqueJobs::Server.configure(config)
end
Sidekiq.configure_client do |config|
config.redis = REDIS_SIDEKIQ_PARAMS
config.client_middleware do |chain|
chain.add SidekiqUniqueJobs::Middleware::Client
end
end
Sidekiq.logger.level = ::Logger.const_get(ENV.fetch('RAILS_LOG_LEVEL', 'info').upcase.to_s)
SidekiqUniqueJobs.configure do |config|
config.reaper = :ruby
config.reaper_count = 1000
config.reaper_interval = 600
config.reaper_timeout = 150
config.lock_ttl = 50.days.to_i
end