mirror of
https://github.com/MCMi460/3DS-RPC.git
synced 2025-06-18 13:35:34 -04:00
backend: Delay after syncing friends
This commit is contained in:
parent
e33db2d7a6
commit
b0a6d43c44
@ -20,8 +20,6 @@ import logging
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
delay = 2
|
||||
since = 0
|
||||
quicker = 15
|
||||
backend_start_time = time.time()
|
||||
scrape_only = False
|
||||
|
||||
@ -128,6 +126,8 @@ async def main_friends_loop(friends_client: friends.FriendsClientV1, session: Se
|
||||
all_friend_pids: list[int] = [ f.pid for f in current_rotation ]
|
||||
await friends_client.sync_friend(0, all_friend_pids, [])
|
||||
|
||||
time.sleep(delay)
|
||||
|
||||
# Query all successful friends.
|
||||
current_friends_list: [friends.FriendRelationship] = await friends_client.get_all_friends()
|
||||
current_friend_pids: [int] = [ f.pid for f in current_friends_list ]
|
||||
@ -270,10 +270,6 @@ if __name__ == '__main__':
|
||||
|
||||
network = NetworkType[args.network.upper()]
|
||||
|
||||
if network != NetworkType.NINTENDO:
|
||||
# This delay is only needed for nintendo, and is unnessary for pretendo.
|
||||
delay, quicker = 0, 1
|
||||
|
||||
start_db_time(datetime.datetime.now(), network)
|
||||
anyio.run(main)
|
||||
except (KeyboardInterrupt, Exception) as e:
|
||||
|
Loading…
Reference in New Issue
Block a user