-
-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ActiveRecord::ConnectionNotEstablished when using async mode #89
Comments
Perhaps good_job needs a railtie? |
I went down a rabbit-hole of allowing the Scheduler/Notifier to defer some of this setup and starting of threadpools until a later time via a Railtie and it got somewhat gnarlier than I was happy with. I may continue down that path in the future. I wonder though, more simply, if it's possible to just hardcode the max threads rather than ask the database adapter, or to ask for the database configuration in a lighter way. |
👍 It was released in v1.2.6. |
I believe that this is fully addressed with the changes in #199 that use Rails configuration to defer the creation of objects that touch ActiveRecord until Rails is fully bootstrapped. |
I have a fairly standard new-ish rails app setup with puma, and added the following:
Then ran:
But got:
It looks like accessing
ActiveRecord::Base.connection_pool.size
at this point of rails initialization is too early.The text was updated successfully, but these errors were encountered: