about summary refs log tree commit diff
path: root/app/models/concerns/redisable.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-05-13 00:02:35 +0200
committerGitHub <noreply@github.com>2022-05-13 00:02:35 +0200
commit6cf57c676550068a59149ca82d63fcb5b5431158 (patch)
tree4832da7de8828519c72a205d9878ccd5a606377a /app/models/concerns/redisable.rb
parent12535568f7435ed627c37312782f8ca07e83eca9 (diff)
Refactor how Redis locks are created (#18400)
* Refactor how Redis locks are created

* Fix autorelease duration on account deletion lock
Diffstat (limited to 'app/models/concerns/redisable.rb')
-rw-r--r--app/models/concerns/redisable.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/concerns/redisable.rb b/app/models/concerns/redisable.rb
index 8d76b6b82..0dad3abb2 100644
--- a/app/models/concerns/redisable.rb
+++ b/app/models/concerns/redisable.rb
@@ -1,11 +1,11 @@
 # frozen_string_literal: true
 
 module Redisable
-  extend ActiveSupport::Concern
-
-  private
-
   def redis
     Thread.current[:redis] ||= RedisConfiguration.pool.checkout
   end
+
+  def with_redis(&block)
+    RedisConfiguration.with(&block)
+  end
 end