about summary refs log tree commit diff
path: root/app/models/custom_filter.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-04-28 17:47:34 +0200
committerGitHub <noreply@github.com>2022-04-28 17:47:34 +0200
commit3917353645b91dae04f7d9b81162fead6f73072a (patch)
tree202cbf93dfa378c26a291900ea65ec088ee5b5cc /app/models/custom_filter.rb
parent9bf04db23acf10e05ffdf7def06c246081f8f065 (diff)
Fix single Redis connection being used across all threads (#18135)
* Fix single Redis connection being used across all Sidekiq threads

* Fix tests
Diffstat (limited to 'app/models/custom_filter.rb')
-rw-r--r--app/models/custom_filter.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/custom_filter.rb b/app/models/custom_filter.rb
index 9d0f3729b..8e3476794 100644
--- a/app/models/custom_filter.rb
+++ b/app/models/custom_filter.rb
@@ -24,6 +24,7 @@ class CustomFilter < ApplicationRecord
   ).freeze
 
   include Expireable
+  include Redisable
 
   belongs_to :account
 
@@ -51,7 +52,7 @@ class CustomFilter < ApplicationRecord
 
   def remove_cache
     Rails.cache.delete("filters:#{account_id}")
-    Redis.current.publish("timeline:#{account_id}", Oj.dump(event: :filters_changed))
+    redis.publish("timeline:#{account_id}", Oj.dump(event: :filters_changed))
   end
 
   def context_must_be_valid