Hello,
we are using sequel to connect to different databases using the
DB#with_server method. While we are in the block every time we are doing a
database query sequel creates a new connection to the database.
This is because every connection is disconnected in the release method of
Sequel::ArbitraryServers, if a server is passed as Hash like it is in our
case. Also the connection is deleted from the cache.
# If server is a hash, delete the thread from the allocated
# connections for that server. Additionally, if this was the last
thread
# using that server, delete the server from the @allocated hash.
def release(thread, conn, server)
if server.is_a?(Hash)
a = @allocated[thread]
a.delete(server)
@allocated.delete(thread) if a.empty?
disconnect_connection(conn)
else
super
end
end
Is there a workaround to keep the connection? Or is this a bug?
Any help is appreciated,
-jannis
--
<http://info.metoda.com/metoda--researchresults>
--
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.