wip
This commit is contained in:
parent
93d330e854
commit
5eeecd95ed
2
main.py
2
main.py
@ -5,6 +5,6 @@ from src.core.master_service import MasterService
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
freeze_support()
|
freeze_support()
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.new_event_loop()
|
||||||
ms = MasterService(loop)
|
ms = MasterService(loop)
|
||||||
ms.loop.run_until_complete(ms.run())
|
ms.loop.run_until_complete(ms.run())
|
||||||
|
@ -70,7 +70,7 @@ class MasterService:
|
|||||||
downloader: BaseParser | YappyParser | MyMailParser | TelegramParser = MasterService.get_parser(video_params)
|
downloader: BaseParser | YappyParser | MyMailParser | TelegramParser = MasterService.get_parser(video_params)
|
||||||
match downloader:
|
match downloader:
|
||||||
case TelegramParser():
|
case TelegramParser():
|
||||||
loop = asyncio.get_running_loop()
|
loop = asyncio.new_event_loop()
|
||||||
asyncio.set_event_loop(loop)
|
asyncio.set_event_loop(loop)
|
||||||
f: asyncio.Future = asyncio.run_coroutine_threadsafe(downloader.video_download())
|
f: asyncio.Future = asyncio.run_coroutine_threadsafe(downloader.video_download())
|
||||||
r = f.result(60)
|
r = f.result(60)
|
||||||
|
Loading…
Reference in New Issue
Block a user