Equivalent of eXist's util:wait in BaseX?
Friday, 27 September 2024 · 3 messages · last reply 28 Sep 2024
CG
Hi Joe,
prof:sleep should do the job [1].
Hope this helps,
Christian
[1] https://docs.basex.org/main/Profiling_Functions#prof:sleepQuoted text · Joe Wicentowski · 15 lines
Joe Wicentowski <joewiz at gmail.com> schrieb am Fr., 27. Sept. 2024, 16:38: > Hi all, > > I'm retrieving content from a list of URLs with BaseX (via the > http:send-request function) and appear to be hitting rate limits on the > remote server. I'd like to pause for 5 seconds between requests. In eXist, > I'd use util:wait [1] to handle this pause. Is there an equivalent in > BaseX? Or is there a different approach in BaseX? > > Thanks! > Joe > > [1] > https://exist-db.org/exist/apps/fundocs/view.html?uri=http://exist-db.org/xquery/util#wait.1 >
JW
Joe Wicentowski27 Sep 2024 18:38 #
Hi all,
I'm retrieving content from a list of URLs with BaseX (via the
http:send-request function) and appear to be hitting rate limits on the remote server. I'd like to pause for 5 seconds between requests. In eXist, I'd use util:wait [1] to handle this pause. Is there an equivalent in BaseX? Or is there a different approach in BaseX?
Thanks!
Joe
[1]
https://exist-db.org/exist/apps/fundocs/view.html?uri=http://exist-db.org/xquery/util#wait.1JW
Hi Christian,
Yes,
prof:sleep is working perfectly. Thank you!
JoeQuoted text · Christian Grün · 30 lines
On Fri, Sep 27, 2024 at 10:42 AM Christian Grün <christian.gruen at gmail.com> wrote: > Hi Joe, > > prof:sleep should do the job [1]. > > Hope this helps, > Christian > > [1] https://docs.basex.org/main/Profiling_Functions#prof:sleep > > > > Joe Wicentowski <joewiz at gmail.com> schrieb am Fr., 27. Sept. 2024, 16:38: > >> Hi all, >> >> I'm retrieving content from a list of URLs with BaseX (via the >> http:send-request function) and appear to be hitting rate limits on the >> remote server. I'd like to pause for 5 seconds between requests. In eXist, >> I'd use util:wait [1] to handle this pause. Is there an equivalent in >> BaseX? Or is there a different approach in BaseX? >> >> Thanks! >> Joe >> >> [1] >> https://exist-db.org/exist/apps/fundocs/view.html?uri=http://exist-db.org/xquery/util#wait.1 >> >
Written for BaseX 11.3. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery