- 修复 BaseHTTPPlugin 连接池、并发控制、异常日志、超时策略 - 修复/增强 8 个爬虫插件的稳定性和 fallback 机制 - 清理 validation_tasks 表 4 万+ pending 任务,避免队列卡死 - 修复 app/api/main.py 缺失全局 app 实例导致的 500 错误 - 提升前端 Axios 超时到 120 秒,避免请求断开 - 修复插件统计持久化和调度器生命周期问题
19 lines
528 B
Python
19 lines
528 B
Python
import asyncio
|
|
import time
|
|
import app.plugins
|
|
from app.services.plugin_service import PluginService
|
|
|
|
async def main():
|
|
svc = PluginService()
|
|
start = time.time()
|
|
results = await svc.run_all_plugins()
|
|
elapsed = time.time() - start
|
|
print(f"Batch crawl completed in {elapsed:.2f}s")
|
|
print(f"Total unique proxies: {len(results)}")
|
|
from collections import Counter
|
|
c = Counter(p.protocol for p in results)
|
|
for proto, cnt in sorted(c.items()):
|
|
print(f" {proto}: {cnt}")
|
|
|
|
asyncio.run(main())
|