Hello there,
I have had a look in the documentation and was wondering, is it possible to cancel a query once it has been submitted using ClientQuery/ClientSession?
Would calling close() on ClientQuery do that?
Shaun
You could use jobs:eval(query…), where you provide the query and you get back an Id for the job. You can then cancel the job using jobs:stop(id)
http://docs.basex.org/wiki/Jobs_Module
From: BaseX-Talk basex-talk-bounces@mailman.uni-konstanz.de On Behalf Of Shaun Flynn Sent: Tuesday, June 26, 2018 4:41 AM To: BaseX basex-talk@mailman.uni-konstanz.de Subject: [basex-talk] Cancelling long running query
Hello there,
I have had a look in the documentation and was wondering, is it possible to cancel a query once it has been submitted using ClientQuery/ClientSession?
Would calling close() on ClientQuery do that?
Shaun
Hi Shaun,
There is no way to cancel a running query with the client/server architecture. The reason is that the socket communication is unidirectional: Once a job has been sent to the the server, the response will be retrieved, and no other command can be sent in parallel.
If you do not need admin permissions, you can set a global timeout via the TIMEOUT option [1].
Hope this helps, Christian
[1] http://docs.basex.org/wiki/Options#TIMEOUT
On Tue, Jun 26, 2018 at 1:41 PM Shaun Flynn scfy12@googlemail.com wrote:
Hello there,
I have had a look in the documentation and was wondering, is it possible to cancel a query once it has been submitted using ClientQuery/ClientSession?
Would calling close() on ClientQuery do that?
Shaun
basex-talk@mailman.uni-konstanz.de