mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-10-25 00:56:14 +08:00
优化请求
This commit is contained in:
+1
-1
@@ -208,7 +208,7 @@ def save(name, total, req_data, resp_queue):
|
||||
new_info = gen_new_info(old_info, resp)
|
||||
db.insert_table(name, new_info)
|
||||
resp_queue.task_done()
|
||||
if i >= total:
|
||||
if i >= total: # 得存入完所有请求结果才能结束
|
||||
break
|
||||
db.close()
|
||||
|
||||
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
@@ -476,7 +477,7 @@ def ip_is_public(ip_str):
|
||||
|
||||
|
||||
def get_request_count():
|
||||
return 32
|
||||
return os.cpu_count() * 16
|
||||
|
||||
|
||||
def uniq_dict_list(dict_list):
|
||||
|
||||
Reference in New Issue
Block a user