Open grasshoppermouse opened 1 week ago
Thank you for reporting that. This should be healed by restarting; does this happen more often? If so, we could put a retry into
RateLimitedAgent
.
I got this error two more times, so a total of three times for ~1000 imported tweets.
As an aside, I got a lot of these (about 3x as many as in this screenshot):
The 403s are all expired links.
I am trying this modification the rate limited agent. I've seen this once, so I am hoping I see it again.
async call<T>(method: () => Promise<T>): Promise<T> {
let attempts = 0;
while (true) {
try {
if (this.waitingForRateLimit) {
await new Promise(resolve => setTimeout(resolve, 1000));
continue;
}
return await method();
} catch (error: any) {
if ( ++attempts > 5) {
throw error;
}
if (error.message.includes('fetch failed')) {
console.warn(`Fetch failed, retrying attempt ${attempts}/5...`);
await new Promise(resolve => setTimeout(resolve, 2000));
continue;
}
if (error.status === 429) {
await this.handleRateLimit(error);
} else {
throw error;
}
}
}
}
Lucky!
Parse tweet id '760390048588136448'
Created at 2016-08-02T08:21:29.000Z
Full text 'Bonjour Asterix! (@ Parc Astérix in Plailly, Picardie) https://t.co/YHSeB53C1U https://t.co/OA6xbLkdWE'
**Fetch failed, retrying attempt 1/5...**
Clean text 'Bonjour Asterix! (@ Parc Astérix in Plailly, Picardie) https://www.swarmapp.com/c/fLeSRS7g2Lz'
Error fetching oembed: no oembed discovery information available
@marcomaroni-github I believe this is handled
@marcomaroni-github I believe this is handled
@clemensv so can I close the bug?
Last item in log: