Pragya Take a look at xdmp:request-cancel.
In this example I select requests associated with the current server - so you may need xdmp:server(<SERVER-NAME>) let $status := xdmp:server-status(xdmp:host(),xdmp:server()) let $requests := $status//server:request-status let $request := (for $request in $requests order by xs:dateTime($request/server: start-time) return $request)[1] return xdmp:request-cancel(xdmp:host(),xdmp:server(),$request/server:request-id/data()) and cancel the first one. You need some way of telling which request you want - hopefully having a look at xdmp:server-status()//server:request-status will help you figure out how you can go about choosing the 'right' one. Ken From: [email protected] [mailto:[email protected]] On Behalf Of Kapoor, Pragya Sent: 22 May 2015 09:04 To: MarkLogic Developer Discussion Subject: [MarkLogic Dev General] Canceling XQuery requests Hi, Is there any way to cancel the Xquery Requests using xquery code? I know, we cancel the queries using the [cancel] action in the (show more) view of Configure/Groups/Default/App Servers/App-Services[HTTP]/status tab. but is there any API which can be used to cancel the queries? Thanks Pragya "This e-mail and any attachments transmitted with it are for the sole use of the intended recipient(s) and may contain confidential , proprietary or privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this e-mail or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful."
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
