From: Thomas W. <tho...@gm...> - 2010-02-04 10:28:21
|
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. Thomas |