mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 14:12:10 +08:00
DEV: Migrate Sidekiq to a dedicated Redis DB
As we’re currently using a namespace for Sidekiq, in order to upgrade to the latest version, we need to drop it as it’s not supported anymore. The recommended way is to use a different Redis DB for Sidekiq. This patch uses a different config for Sidekiq and also takes care of migrating existing jobs (in queues and the retry and scheduled sets).
This commit is contained in:

committed by
Loïc Guitaut

parent
80625f6c1c
commit
b9dd9c70a5
@ -1047,10 +1047,10 @@ module Discourse
|
||||
|
||||
SIDEKIQ_NAMESPACE = "sidekiq"
|
||||
|
||||
def self.sidekiq_redis_config
|
||||
conf = GlobalSetting.redis_config.dup
|
||||
conf[:namespace] = SIDEKIQ_NAMESPACE
|
||||
conf
|
||||
def self.sidekiq_redis_config(old: false)
|
||||
redis_config = GlobalSetting.redis_config.dup
|
||||
return redis_config.merge(namespace: SIDEKIQ_NAMESPACE) if old
|
||||
redis_config.merge(db: redis_config[:db].to_i + 1)
|
||||
end
|
||||
|
||||
def self.static_doc_topic_ids
|
||||
|
Reference in New Issue
Block a user