From: Thomas W. <tho...@gm...> - 2010-02-03 20:43:30
|
Andrzej, 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. 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. Thomas ------ Thomas White Mobile:+44 7711 922 966 Skype: thomaswhite gTalk: thomas.0007 Linked-In:http://www.linkedin.com/in/thomaswhite0007 facebook: http://www.facebook.com/thomas.0007 On 3 February 2010 16:36, Adam Retter <ad...@ex...> wrote: > On 3 February 2010 16:09, Andrzej Jan Taramina <an...@ch...> > wrote: > > Thomas: > > > >> BTW, is there a way to reduce the number remaining calls for > >> *schedule-xquery-periodic-job* in run time? > >> Use case: I need to process a dataset running periodically a XQuery > >> function that process a chunk of that data. I expect to have 5000 calls > >> but the data set is smaller this time and I need to cancel it after the > >> 50th call. Can I do this? If not, I hope we can then extend > >> *schedule-xquery-periodic-job* function to cancel the job if the > >> scheduled function returns false(). > > > > The easiest way to do that might be to just trigger the first call....and > have each call chain to another call (that is, > > fire another scheduled job to run immediately), if there is data left to > process. > > > > That way the calls will just keep being initiated until all the data is > consumed and processed. > > Thats a much nicer approach :-) > > > -- > > Andrzej Taramina > > Chaeron Corporation: Enterprise System Solutions > > http://www.chaeron.com > > > > > > -- > Adam Retter > > eXist Developer > { United Kingdom } > ad...@ex... > irc://irc.freenode.net/existdb > |