Hey
I love the sharded approach to setup two separate connections, but we're
already using sharding to connect to multiple DBs, and I don't want to
further complicate that.
The long running queries are used very infrequently and only in one or two
places in the code, so I'm happy to use it in a block.
J
On Friday, 4 May 2018 15:54:13 UTC+2, Jeremy Evans wrote:
>
> On Thursday, May 3, 2018 at 10:33:59 PM UTC-7, Jurgens du Toit wrote:
>>
>> Thanx.
>>
>> This is to a MSSQL server which doesn't seem to have the ability to set
>> the timeout using SQL :/
>>
>> I ended up "cloning" the current connection and creating a new one with a
>> larger timeout, and then discarding it afterwards:
>>
>> Sequel.connect(original_db.uri, timeout: 360) do |db|
>> db[long_running_query]
>> end
>>
>
> If that works, you should be able to use sharding, with :timeout as the
> only option for the shard (e.g. :servers=>{:long_time=>{:timeout=>360}
> Database option and .server(:long_time) on the dataset).
>
> 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.
For more options, visit https://groups.google.com/d/optout.