Rename with_lock
to with_redis_lock
to avoid confusion with ActiveRecord's method (#24741)
This commit is contained in:
@@ -18,7 +18,7 @@ class VoteService < BaseService
|
||||
|
||||
already_voted = true
|
||||
|
||||
with_lock("vote:#{@poll.id}:#{@account.id}") do
|
||||
with_redis_lock("vote:#{@poll.id}:#{@account.id}") do
|
||||
already_voted = @poll.votes.where(account: @account).exists?
|
||||
|
||||
ApplicationRecord.transaction do
|
||||
|
Reference in New Issue
Block a user