This commit is contained in:
2025-05-19 15:00:21 +03:00
parent b6b37753af
commit dc4c6d54f1

View File

@ -7,8 +7,11 @@ from jsoner.async_ import json_read
class AsyncBaseSession: class AsyncBaseSession:
def __init__(self, base_dir: Path, errors_dir: Path, banned_dir: Path): def __init__(self, base_dir: Path, errors_dir: Path, banned_dir: Path):
self.base_dir = base_dir self.base_dir = base_dir
self.base_dir.mkdir(exist_ok=True)
self.errors_dir = errors_dir self.errors_dir = errors_dir
self.errors_dir.mkdir(exist_ok=True)
self.banned_dir = banned_dir self.banned_dir = banned_dir
self.banned_dir.mkdir(exist_ok=True)
self.json_errors: set[Path] = set() self.json_errors: set[Path] = set()
async def __aiter__(self) -> AsyncGenerator[tuple[Path, Path, dict], None]: async def __aiter__(self) -> AsyncGenerator[tuple[Path, Path, dict], None]: