I'll preface this question: We still have to work through upgrading 
deprecation warnings so we can upgrade to Sequel 5.0/Ruby 3 (we're on 
4.49.0/2.7.3)

The system I work on has numerous postgres databases it connects to (it's a 
bit of a monolith).  We have servers that only use parts of the system, but 
we end up connecting to every database at startup.

I'm wondering if there's a lazy way to load databases, where it doesn't 
make an attempt to connect until a "real" reason to do so is needed.    We 
currently have code that does `Sequel.connect` for each of the db urls, the 
loads a default set of extensions.  

If there was a `lazy_connect` for example, everything would work exactly 
the same until a model was queried, etc.

I looked through the `connect` documentation and couldn't really come up 
with a way to do it.  

I'm just wondering if it's even possible to do something like this.





-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/9e669c7b-e147-4e4d-980a-93a5c231b4een%40googlegroups.com.

Reply via email to