Re: Cancel threads after timeout
> Sometimes it happens that a query on one of the database servers
> takes longer than expected and impedes the generation of this report
> (that's right, the queries are ran sequential). What I am trying to
> achieve is to parallelize the queries on each database server and to be
> able to cancel one of them if it takes longer than X minutes.
Only answering a small portion of your question ....
Assuming you are able to figure out how to "cancel" a thread or
process on your side, it is possible the database itself will not
respect that. In other words, if you execute "SELECT ..." singly,
outside of Python, and type CNTL-C, does your database quickly
recognize you are no longer interested in the result set and stop its
|All times are GMT. The time now is 10:22 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.