1 second delay for post fetching

This commit is contained in:
Mint 2022-10-21 02:08:27 +03:00
parent 5d61b6a5e6
commit 9a85a336ce

View file

@ -16,6 +16,7 @@ from functools import partial
from typing import Iterable, NewType
from utils import shield, HandleRateLimits, suppress
from third_party.utils import extract_post_content
from time import sleep
USER_AGENT = (
'pleroma-ebooks; '
@ -170,6 +171,7 @@ class PostFetcher:
next_page_url = outbox['first']
while True:
sleep(1)
print(f'Fetching {next_page_url}... ')
async with self._rl_handler.request('GET', next_page_url) as resp: page = await resp.json()