From: Adam R. <ad...@ex...> - 2010-02-04 11:39:12
|
On 4 February 2010 10:27, Thomas White <tho...@gm...> wrote: > On 3 February 2010 21:21, Andrzej Jan Taramina <an...@ch...> wrote: >> >> Thomas: >> >> > That will work, but it seams a little bit messy. The function has to be >> > prepared specifically to know how to chain with re-scheduling call to >> > itself at the end of the function. >> >> True, but that is a very simple thing to do, and the XQuery would be crafted to be run using the scheduler only (though >> there are fancy ways to craft an XQuery that can run with a REST invocation and as a scheduled task). > > I this is an application very specific approach. I would use it only > if there is no other way. > >> > On other hand if we have schedule-xquery-periodic-job extended to pay >> > attentions to the returned value, then any function that returns boolean >> > can be called repeatedly until the data is consumed. >> >> I'm gonna vote -1 on that. It's outside of the scope of what a periodic scheduled job should do and is really >> application specific. > > I think the opposite way - this is generic functionality. It is an > equivalent of BREAK in FOR loop. > I can't think about more generic then a break functionality. > > One more thing. When we have an asynchronous function it is very > common to have a callback function that is called at completion of the > main function. If we have an option to pass a callback function when > we schedule an XQuery function, this will allow us to do post > processing on the results. You can already pass functions in XQuery through the function() and call() functions. I agree with Andrzej though. Everything that you need is already present. > Thomas > -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |