diff options
author | Stan Hu <stanhu@gmail.com> | 2019-07-22 09:00:37 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-07-22 20:23:07 +0300 |
commit | 583c12acf44ba18adea45eb0e61f287861c44e43 (patch) | |
tree | bd8e973c57a2c50396f0286b376713f30ec2abcb /lib/gitlab/workhorse.rb | |
parent | 3cc5535c0c7a52c93b00c1a1260eb8d828a3e9dc (diff) |
Use persistent Redis cluster for Workhorse pub/sub notifications
Previously, in Omnibus, Workhorse expected to listen via the Redis
shared state cluster for the `workhorse:notifications` publish/subscribe
channel, but the Rails code was using the Sidekiq queue cluster for
this. To fix this inconsistency, we make the Rails code use the
persistent cluster, since we don't want Workhorse to be looking at
anything Sidekiq-related.
Diffstat (limited to 'lib/gitlab/workhorse.rb')
-rw-r--r-- | lib/gitlab/workhorse.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb index 46a7b5b982a..3b77fe838ae 100644 --- a/lib/gitlab/workhorse.rb +++ b/lib/gitlab/workhorse.rb @@ -221,7 +221,7 @@ module Gitlab end def set_key_and_notify(key, value, expire: nil, overwrite: true) - Gitlab::Redis::Queues.with do |redis| + Gitlab::Redis::SharedState.with do |redis| result = redis.set(key, value, ex: expire, nx: !overwrite) if result redis.publish(NOTIFICATION_CHANNEL, "#{key}=#{value}") |