pauamma: Cartooney crab wearing hot pink and acid green facemask holding drink with straw (Default)
Res facta quae tamen fingi potuit ([personal profile] pauamma) wrote in [site community profile] dw_dev2023-02-01 01:57 am
Entry tags:

Question thread #118

It's time for another question thread!

The rules:

- You may ask any dev-related question you have in a comment. (It doesn't even need to be about Dreamwidth, although if it involves a language/library/framework/database Dreamwidth doesn't use, you will probably get answers pointing that out and suggesting a better place to ask.)
- You may also answer any question, using the guidelines given in To Answer, Or Not To Answer and in this comment thread.
solarbird: (Default)

well howdy

[personal profile] solarbird 2023-02-04 08:31 am (UTC)(link)
Hi, been a while, threw you some code a few years ago, never left the site but haven't been doing much code lately. Been here for ages, no plans to leave.

What's good beahviour for remote API calls? What kind of delay or rate per hour is okay? I didn't see anything in the FAQ (apologies if I missed it), I didn't see anything when doing some searching.

The reason I'm asking is because while I'm not planning to leave, running a Mastodon server has reminded me that it's nice to have my own copies of my stuff, and since we already do a lot of Wordpress, that seemed like a good way. So I've mildly modified their Livejournal importer to import Dreamwidth, and got through about 130 entries before getting an API rate shutdown.

That's fine, I don't mind. But I have a lot of entries and that's gonna be a lot of halts. I'd rather add some delay in the importer to avoid that.

So. What's a good amount of time between, say, authentications - the easiest place to do it in this code - to slow down and wait?

Thanks!

eta: the specific error is "Client error: Client is making repeated requests. Perhaps it's broken?" in case that's different. This code does make a lot of requests.
Edited 2023-02-04 08:34 (UTC)