Thank you.
We added:
servers: { read_only: {} }
, as written in the documentation, and we're getting:
```
> DB.with_server(:foo) { Artist.all }
NoMethodError: undefined method `[]' for nil:NilClass
from
/home/alex/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/sequel-5.19.0/lib/sequel/connection_pool/sharded_threaded.rb:313:in
`block in owned_connection'
Is it normal?
On Monday, May 6, 2019 at 4:50:33 PM UTC+3, Jeremy Evans wrote:
>
> On Monday, May 6, 2019 at 6:16:28 AM UTC-7, [email protected]
> <javascript:> wrote:
>>
>> Hello!
>>
>> I'm little surprised when I do `DB.with_server(:nonexistent) { Artist.all
>> }` and I'm getting result from `:default` server instead of error.
>>
>> Can there be an option for exception? Or do I need to check via
>> `DB.servers` manually?
>>
>
> Please see the information on the :servers_hash option at
> http://sequel.jeremyevans.net/rdoc/files/doc/sharding_rdoc.html#label-Sharding
>
> Thanks,
> Jeremy
>
--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sequel-talk/c61302bf-1657-43d6-a948-03af4bb6f19e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.