@@ -104,8 +104,8 @@ async def update_all_users_in_database(
104104 await gather_with_limited_concurrency (
105105 [
106106 # CN site has a strong rate limit
107- gather_with_limited_concurrency (cn_tasks , 4 ),
108- gather_with_limited_concurrency (us_tasks , 25 ),
107+ gather_with_limited_concurrency (cn_tasks , 1 ),
108+ gather_with_limited_concurrency (us_tasks , 5 ),
109109 ],
110110 30 ,
111111 )
@@ -163,6 +163,7 @@ async def save_users_of_contest(
163163 ]
164164 cursor = col .aggregate (pipeline )
165165 docs = await cursor .to_list (length = None )
166+ logger .info (f"docs length = { len (docs )} " )
166167 cn_tasks = []
167168 us_tasks = []
168169 for doc in docs :
@@ -181,8 +182,8 @@ async def save_users_of_contest(
181182 await gather_with_limited_concurrency (
182183 [
183184 # CN site has a strong rate limit
184- gather_with_limited_concurrency (cn_tasks , 4 ),
185- gather_with_limited_concurrency (us_tasks , 25 ),
186- 30 ,
185+ gather_with_limited_concurrency (cn_tasks , 1 ),
186+ gather_with_limited_concurrency (us_tasks , 5 ),
187187 ],
188+ 30 ,
188189 )
0 commit comments