Rails 4 seem to use the PG::Connection#connect method rather than PG#connect. If I add the following monkey-patch, the queries do seem to execute asynchronously:
module PG
class Connection
def self.connect(*args)
Async::Postgres::Proxy.new(*args)
end
end
end
I can send a PR in a few weeks, if that's the way we want to go.
Rails 4 seem to use the
PG::Connection#connect
method rather thanPG#connect
. If I add the following monkey-patch, the queries do seem to execute asynchronously:I can send a PR in a few weeks, if that's the way we want to go.