Re: PEP 249 - DB API question

2008-11-04 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, James Mills wrote: > Try spawning a new process to run your query in. One approach might be to have two processes: the worker process and the watcher process. The worker does the work, of course. Before performing any call that may hang, the worker sends a message

Re: PEP 249 - DB API question

2008-11-04 Thread James Mills
On Wed, Nov 5, 2008 at 6:13 AM, k3xji <[EMAIL PROTECTED]> wrote: > >> Try spawning a new process to run your query >> in. Use the multiprocessing library. Your main >> application can then just poll the db/query processes >> to see if they're a) finished and b) have a result >> >> Your application

Re: PEP 249 - DB API question

2008-11-04 Thread k3xji
> Try spawning a new process to run your query > in. Use the multiprocessing library. Your main > application can then just poll the db/query processes > to see if they're a) finished and b) have a result > > Your application server can also c0 kill long running > queries that are "deemed" to be t

Re: PEP 249 - DB API question

2008-11-04 Thread M.-A. Lemburg
On 2008-11-04 18:52, k3xji wrote: > Hi all, > > As development goes on for a server project, it turns out that I am > using the MySQLDB and DB interactions excessively. One questions is > just bothering me, why don't we have a timeout for queries in PEP 249 > (DB API)? > > Is it really safe to wa

Re: PEP 249 - DB API question

2008-11-04 Thread James Mills
On Wed, Nov 5, 2008 at 3:52 AM, k3xji <[EMAIL PROTECTED]> wrote: > As development goes on for a server project, it turns out that I am > using the MySQLDB and DB interactions excessively. One questions is > just bothering me, why don't we have a timeout for queries in PEP 249 > (DB API)? Because n

PEP 249 - DB API question

2008-11-04 Thread k3xji
Hi all, As development goes on for a server project, it turns out that I am using the MySQLDB and DB interactions excessively. One questions is just bothering me, why don't we have a timeout for queries in PEP 249 (DB API)? Is it really safe to wait for a query to finish, means, is it always retu