From 91119d0762d0c352d55949d082738491d6c6012d Mon Sep 17 00:00:00 2001 From: "Il'ya (Marshal)" Date: Sun, 19 Jun 2022 21:00:17 +0200 Subject: [PATCH] need to cache resolved peers in the future ([420 FLOOD_WAIT_X] - A wait of 29091 seconds is required ) --- make_files_tree.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/make_files_tree.py b/make_files_tree.py index aa9695c927..8ae2f8bb3c 100644 --- a/make_files_tree.py +++ b/make_files_tree.py @@ -464,6 +464,7 @@ async def _fetch_and_track_mtproto(app, output_dir): else: bots_usernames_to_track.add('PremiumBot') + bots_usernames_to_track.clear() for bot_username in bots_usernames_to_track: bot_peer = await app.resolve_peer(bot_username) bot_full = (await app.invoke(functions.users.GetFullUser(id=bot_peer))) @@ -474,6 +475,7 @@ async def _fetch_and_track_mtproto(app, output_dir): peers_to_track.add('invoice') peers_to_track.add('premium') + peers_to_track.clear() for peer_id in peers_to_track: peer = await app.resolve_peer(peer_id) configs[f'peer/{peer_id}'] = peer