Add config for more video and/or upload workers

This commit is contained in:
blank X 2021-01-15 13:39:43 +07:00
parent 990be67d56
commit d2ade3e0ae
2 changed files with 7 additions and 1 deletions

View File

@ -19,7 +19,11 @@ async def main(nodl):
await update_seen_videos()
await client.disconnect()
else:
await asyncio.gather(check_channels(False), video_worker(), upload_worker())
await asyncio.gather(
check_channels(False),
*[video_worker() for _ in range(config['config'].get('video_workers', 1))],
*[upload_worker() for _ in range(config['config'].get('upload_workers', 1))]
)
await client.disconnect()
if len(sys.argv) not in (1, 2):

View File

@ -6,6 +6,8 @@ config:
storage_chat_id: -1001289824958
storage_message_id: 5261
wait_seconds: 1800
video_workers: 5
upload_workers: 1
channels:
- UCL_qhgtOy0dy1Agp8vkySQg
- UCHsx4Hqa-1ORjQTh9TYDhww