Cancelling long running query

Tuesday, 26 June 2018 · 3 messages · last reply 29 Jun 2018
SF
Shaun Flynn26 Jun 2018 13:41 #
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
PV
Peter Villadsen26 Jun 2018 18:48 #
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
Quoted text · BaseX-Talk · 8 lines
From: BaseX-Talk <basex-talk-bounces at mailman.uni-konstanz.de> On Behalf Of Shaun Flynn Sent: Tuesday, June 26, 2018 4:41 AM To: BaseX <basex-talk at 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
CG
Christian Grünin reply to Shaun Flynn, 26 Jun 2018, 13:4129 Jun 2018 09:57 #
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
Quoted text · Shaun Flynn · 9 lines
On Tue, Jun 26, 2018 at 1:41 PM Shaun Flynn <scfy12 at 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

⚡Generated with XQuery