Re: Standalone script with django's ORM and multiprocessing

2009-08-11 Thread Spajderix
prabhu S pisze: > Solution appears like a hack to me. Why do you close the connection in > every process? Can you not just close once in parent? Execute commits > alone in each process. > I've checked that. Unfortunately, in my case, it won't work. I have a loop looking like this: for job in

Re: Standalone script with django's ORM and multiprocessing

2009-08-11 Thread Malcolm Tredinnick
On Tue, 2009-08-11 at 03:12 -0700, prabhu S wrote: [...] > Why do you close the connection in > every process? Can you not just close once in parent? That would also work. Regards, Malcolm --~--~-~--~~~---~--~~ You received this message because you are subscrib

Re: Standalone script with django's ORM and multiprocessing

2009-08-11 Thread prabhu S
Solution appears like a hack to me. Why do you close the connection in every process? Can you not just close once in parent? Execute commits alone in each process. On Aug 11, 10:50 am, Spajderix wrote: > Malcolm Tredinnick pisze: > > > > > On Tue, 2009-08-11 at 11:06 +0200, Spajderix wrote: > >

Re: Standalone script with django's ORM and multiprocessing

2009-08-11 Thread Spajderix
Malcolm Tredinnick pisze: > On Tue, 2009-08-11 at 11:06 +0200, Spajderix wrote: > >> Hi! >> >> I've written a standalone script, which looks throught a table in db for >> tasks to perform. It then starts subprocesses for each task it founds >> using multiprocessing.Process class from python. E

Re: Standalone script with django's ORM and multiprocessing

2009-08-11 Thread Malcolm Tredinnick
On Tue, 2009-08-11 at 11:06 +0200, Spajderix wrote: > Hi! > > I've written a standalone script, which looks throught a table in db for > tasks to perform. It then starts subprocesses for each task it founds > using multiprocessing.Process class from python. Everything's fine when > there is on