From 5eeecd95edc14298c159defadea28531d127b629 Mon Sep 17 00:00:00 2001 From: Dantenerosas Date: Wed, 18 Oct 2023 00:47:58 +0300 Subject: [PATCH] wip --- main.py | 2 +- src/core/master_service.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 1c4f13c..91f82c3 100644 --- a/main.py +++ b/main.py @@ -5,6 +5,6 @@ from src.core.master_service import MasterService if __name__ == '__main__': freeze_support() - loop = asyncio.get_event_loop() + loop = asyncio.new_event_loop() ms = MasterService(loop) ms.loop.run_until_complete(ms.run()) diff --git a/src/core/master_service.py b/src/core/master_service.py index 20f4282..68e1d84 100644 --- a/src/core/master_service.py +++ b/src/core/master_service.py @@ -70,7 +70,7 @@ class MasterService: downloader: BaseParser | YappyParser | MyMailParser | TelegramParser = MasterService.get_parser(video_params) match downloader: case TelegramParser(): - loop = asyncio.get_running_loop() + loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) f: asyncio.Future = asyncio.run_coroutine_threadsafe(downloader.video_download()) r = f.result(60)