优化请求

This commit is contained in:
Jing Ling
2021-01-29 00:46:17 +08:00
parent bf63268e5e
commit 56010d9712
4 changed files with 29 additions and 4 deletions
+1 -1
View File
@@ -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
View File
@@ -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):