~cnx/rsskey

9162549a27b02f5f9ce9adea3b957618db460779 — Nguyễn Gia Phong 2 years ago 23a1828
Lower maximum number of connections

Misskey backend is fragile.
1 files changed, 3 insertions(+), 2 deletions(-)

M src/rsskey.py
M src/rsskey.py => src/rsskey.py +3 -2
@@ 21,7 21,7 @@ from functools import partial
from re import split, sub

from feedparser import parse
from httpx import AsyncClient
from httpx import AsyncClient, Limits
from loca import Loca
from markdownify import markdownify as md
from trio import open_nursery, run


@@ 80,7 80,8 @@ async def main():
        for section in config:
            if section == 'DEFAULT': continue
            job = config[section]
            client = AsyncClient(base_url=job['dest'])
            client = AsyncClient(base_url=job['dest'],
                                 limits=Limits(max_connections=16))
            await stack.enter_async_context(client)
            nursery.start_soon(mirror, nursery, job, client)