File size: 751 Bytes
1404692 ad58f28 f697c3b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | from pyrogram import Client
from Backend.config import Telegram
StreamBot = Client(
name='bot',
api_id=Telegram.API_ID,
api_hash=Telegram.API_HASH,
bot_token=Telegram.BOT_TOKEN,
plugins={"root": "Backend/pyrofork/plugins"},
sleep_threshold=20,
workers=6,
max_concurrent_transmissions=10
)
Helper = Client(
"helper",
api_id=Telegram.API_ID,
api_hash=Telegram.API_HASH,
bot_token=Telegram.HELPER_BOT_TOKEN,
sleep_threshold=20,
workers=6,
max_concurrent_transmissions=10
)
multi_clients = {}
work_loads = {}
client_dc_map = {}
client_failures = {} # tracks cumulative chunk-fetch failures per client index
client_avg_mbps = {} # rolling average MB/s per client (updated after each stream)
|