()
| 70 | return tg_clients |
| 71 | |
| 72 | async def run_tasks(): |
| 73 | tg_clients = get_tg_clients() |
| 74 | proxies = get_proxies() |
| 75 | proxies_cycle = cycle(proxies) if proxies else None |
| 76 | loop = asyncio.get_event_loop() |
| 77 | |
| 78 | if settings.USE_CUSTOM_PAYLOAD_SERVER and not await check_payload_server(settings.CUSTOM_PAYLOAD_SERVER_URL, full_test=True): |
| 79 | logger.warning( |
| 80 | f"The payload server on {settings.CUSTOM_PAYLOAD_SERVER_URL} is unavailable or not running. " |
| 81 | f"<y>Without it, the bot will not play games for passes.</y> \n" |
| 82 | f"<r>Read info</r>: https://github.com/HiddenCodeDevs/BlumTelegramBot/blob/main/PAYLOAD-SERVER.MD" |
| 83 | ) |
| 84 | |
| 85 | tasks = [ |
| 86 | loop.create_task( |
| 87 | run_tapper( |
| 88 | tg_client=tg_client, |
| 89 | proxy=next(proxies_cycle) if proxies_cycle else None |
| 90 | ) |
| 91 | ) |
| 92 | for tg_client in tg_clients |
| 93 | ] |
| 94 | |
| 95 | await asyncio.gather(*tasks) |
nothing calls this directly
no test coverage detected