DEV: Fix implementation for `DiscourseRedis#exists`.

DEV: Fix implementation for DiscourseRedis#exists.

diff --git a/lib/discourse_redis.rb b/lib/discourse_redis.rb
index 5ef5de9..e273810 100644
--- a/lib/discourse_redis.rb
+++ b/lib/discourse_redis.rb
@@ -208,13 +208,15 @@ class DiscourseRedis
     end
   end
 
-  # Remove when this has been upstreamed in https://github.com/redis/redis-rb/pull/911
+  # Implement our own because https://github.com/redis/redis-rb/issues/698 has stalled
   def exists(*keys)
     keys.map! { |a| "#{namespace}:#{a}" }  if @namespace
 
     DiscourseRedis.ignore_readonly do
-      @redis._client.call([:exists, *keys]) do |value|
-        value > 0
+      @redis.synchronize do |client|
+        client.call([:exists, *keys]) do |value|
+          value > 0
+        end
       end
     end
   end
diff --git a/spec/components/discourse_redis_spec.rb b/spec/components/discourse_redis_spec.rb
index 059e144..8e44116 100644
--- a/spec/components/discourse_redis_spec.rb
+++ b/spec/components/discourse_redis_spec.rb
@@ -88,7 +88,6 @@ describe DiscourseRedis do
       end
     end
 
-    # Remove when this has been upstreamed in https://github.com/redis/redis-rb/pull/911
     describe '.exists' do
       it 'should return false when key is not present' do
         expect(Discourse.redis.exists('test')).to eq(false)

GitHub sha: 389bdcf5