Change intervals
This commit is contained in:
parent
49fd8a5dc9
commit
6bcee318e4
1 changed files with 2 additions and 2 deletions
|
@ -205,7 +205,7 @@ function _threadifyStatus(status, propInstance) {
|
||||||
let prevStatus = states.statuses[key];
|
let prevStatus = states.statuses[key];
|
||||||
if (!prevStatus) {
|
if (!prevStatus) {
|
||||||
if (fetchIndex++ > 3) throw 'Too many fetches for thread'; // Some people revive old threads
|
if (fetchIndex++ > 3) throw 'Too many fetches for thread'; // Some people revive old threads
|
||||||
await new Promise((r) => setTimeout(r, 300 * fetchIndex)); // Be nice to rate limits
|
await new Promise((r) => setTimeout(r, 500 * fetchIndex)); // Be nice to rate limits
|
||||||
// prevStatus = await masto.v1.statuses.$.select(inReplyToId).fetch();
|
// prevStatus = await masto.v1.statuses.$.select(inReplyToId).fetch();
|
||||||
prevStatus = await fetchStatus(inReplyToId, masto);
|
prevStatus = await fetchStatus(inReplyToId, masto);
|
||||||
saveStatus(prevStatus, instance, { skipThreading: true });
|
saveStatus(prevStatus, instance, { skipThreading: true });
|
||||||
|
@ -227,7 +227,7 @@ function _threadifyStatus(status, propInstance) {
|
||||||
console.error(e, status);
|
console.error(e, status);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
export const threadifyStatus = rateLimit(_threadifyStatus, 300);
|
export const threadifyStatus = rateLimit(_threadifyStatus, 100);
|
||||||
|
|
||||||
const fetchStatus = pmem((statusID, masto) => {
|
const fetchStatus = pmem((statusID, masto) => {
|
||||||
return masto.v1.statuses.$select(statusID).fetch();
|
return masto.v1.statuses.$select(statusID).fetch();
|
||||||
|
|
Loading…
Add table
Reference in a new issue