If you’re running in a separate thread, normally you would wrap any code accessing the database was
When you’re using horizontal sharding, does the
ActiveRecord::Base.connected_to(shard: :foo, role: :reading) implicilty checkout a connection from the connection pool, or do you need to include the
If you do need to include the
with_connection call, do you do that inside the
connected_to block, or outside?