babashka

https://github.com/babashka/babashka. Also see #sci, #nbb and #babashka-circleci-builds .
2021-06-23T14:50:30.168900Z

What's the best way to throttle the number of calls to an API in babashka? I have a sequence of calls to make from babashka to an API, but I'm not allowed to just (run! #(cmd! %) command-collection) because the server will deny my calls if I execute them too fast. What's the best way to interleave my commands with something like a pause for x milliseconds?

lispyclouds 2021-06-23T14:57:13.169400Z

off the top of my head 😛 (interleave [call1 call2 ...] (cycle [#(Thread/sleep 1000)]))

2021-06-23T14:58:37.169700Z

Nice ... going to try that 🤓

2021-06-23T15:03:21.170Z

Yep, with a slight variation to fit my context, it works, thanks!

😄 2