You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've done more hacking, and thought I'd share. Still don't feel like patching spawn's code, it does a lot of connection management already that I don't want to mess with, but I'm using DelayedJobSpawner and put this in its prefork:
$AR_connection_pools = ActiveRecord::Base.connection_handler.connection_pools.map do |name, pool|
OpenStruct.new(:model => name, :config => pool.spec.config)
end
Closing to clean up as this in an old issue, if this is still valid on the latest version of spawnling then please re-open the issue and I will address it.
Rails supports multiple databases among models via Model.establish_connection('other_database'), and spawn resets these connection pools:
Ex, we put delayed jobs in a different database:
I'm currently hacking around this, but thought I'd make a ticket.
The text was updated successfully, but these errors were encountered: