refactor: enhance proxy pool logging with masked URLs and decrease proxy test concurrency from 20 to 10.
This commit is contained in:
@@ -3974,13 +3974,13 @@ class ProvisionerBot:
|
||||
await self.app.bot.send_message(
|
||||
chat_id,
|
||||
f"🌐 <b>代理池预检测</b>\n\n"
|
||||
f"正在测试 {pool_count} 个代理 (20 并发)...",
|
||||
f"正在测试 {pool_count} 个代理 (10 并发)...",
|
||||
parse_mode="HTML"
|
||||
)
|
||||
loop = asyncio.get_event_loop()
|
||||
test_result = await loop.run_in_executor(
|
||||
self.executor,
|
||||
lambda: proxy_pool.test_and_clean_proxies(concurrency=20)
|
||||
lambda: proxy_pool.test_and_clean_proxies(concurrency=10)
|
||||
)
|
||||
await self.app.bot.send_message(
|
||||
chat_id,
|
||||
@@ -6459,7 +6459,7 @@ class ProvisionerBot:
|
||||
msg = await update.message.reply_text(
|
||||
f"🔄 <b>正在测试代理</b>\n\n"
|
||||
f"📊 代理数量: <b>{pool_count}</b>\n"
|
||||
f"⚡ 并发数: <b>20</b>\n"
|
||||
f"⚡ 并发数: <b>10</b>\n"
|
||||
f"🎯 测试目标: <code>api.openai.com</code>\n"
|
||||
f"⏱ 超时: <b>10s</b>\n\n"
|
||||
f"⏳ 测试进行中...",
|
||||
@@ -6469,7 +6469,7 @@ class ProvisionerBot:
|
||||
loop = asyncio.get_event_loop()
|
||||
result = await loop.run_in_executor(
|
||||
self.executor,
|
||||
lambda: proxy_pool.test_and_clean_proxies(concurrency=20)
|
||||
lambda: proxy_pool.test_and_clean_proxies(concurrency=10)
|
||||
)
|
||||
|
||||
# 构建详细结果
|
||||
@@ -7134,7 +7134,7 @@ class ProvisionerBot:
|
||||
loop = asyncio.get_event_loop()
|
||||
test_result = await loop.run_in_executor(
|
||||
self.executor,
|
||||
lambda: proxy_pool.test_and_clean_proxies(concurrency=20)
|
||||
lambda: proxy_pool.test_and_clean_proxies(concurrency=10)
|
||||
)
|
||||
log.info(f"[Scheduler] 代理池: 存活 {test_result['alive']}/{test_result['total']},移除 {test_result['removed']}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user