Thanks, I have solved the problem calling "Model.db.disconnect" at the start of every job code, it works great.
I own you a beer! Is there maybe a place where I can read about what happen low level that cause the problem, I always struggle to understand what can happen in this case, would love to learn! On Thursday, 13 April 2017 21:27:45 UTC+2, Jeremy Evans wrote: > > On Thursday, April 13, 2017 at 11:46:32 AM UTC-7, Nicolò Benigni wrote: >> >> Thanks for the info, but I have one more doubt, if in my forked process >> the code that get executed is all like, >> >> ``` >> jon = Customer.last >> # do stuff with jon >> ``` >> >> How should I call disconnect?? On Customer.db ? >> > > Like I said, before forking. It's possible the resque:pool:setup task > would work: > > task "resque:pool:setup" do > DB.disconnect > end > > > But I've never used resque-pool. If you have any questions about how to > execute code before forking, ask the resque-pool developers. > > 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.
