method
execute_or_skip
v7.1.3.2 -
Show latest stable
- Class:
ActiveRecord::FutureResult
execute_or_skip()public
No documentation available.
# File activerecord/lib/active_record/future_result.rb, line 89
def execute_or_skip
return unless pending?
@pool.with_connection do |connection|
return unless @mutex.try_lock
begin
if pending?
@event_buffer = EventBuffer.new(self, @instrumenter)
connection.with_instrumenter(@event_buffer) do
execute_query(connection, async: true)
end
end
ensure
@mutex.unlock
end
end
end