12 13 14 15 16 17 18
# File 'lib/messaging/adapters/postgres/create_lock.rb', line 12 def call connection.execute "SELECT pg_advisory_lock(#{lock_key});" rescue ActiveRecord::QueryCanceled => e Messaging.logger.debug "Locking failed, retrying in 5 seconds" sleep 5 retry end