fix: 格式化代码以提高可读性和一致性
This commit is contained in:
parent
539ccad2f3
commit
b160abf7cc
11
onoe.py
11
onoe.py
@ -18,7 +18,6 @@ from logger import logger
|
|||||||
import os
|
import os
|
||||||
import urllib3
|
import urllib3
|
||||||
|
|
||||||
|
|
||||||
db = DBVidcon()
|
db = DBVidcon()
|
||||||
MACHINE_ID = None
|
MACHINE_ID = None
|
||||||
MAX_WORKERS = 10
|
MAX_WORKERS = 10
|
||||||
@ -424,7 +423,7 @@ def integrate_data_parallel():
|
|||||||
while True:
|
while True:
|
||||||
global proxiesdict
|
global proxiesdict
|
||||||
proxiesdict = db.get_proxy_agent_dict()
|
proxiesdict = db.get_proxy_agent_dict()
|
||||||
tasks, flag = db.item_keyword()
|
tasks, flag = db.item_keyword(1)
|
||||||
if not tasks:
|
if not tasks:
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
continue
|
continue
|
||||||
@ -463,13 +462,7 @@ def integrate_data_parallel():
|
|||||||
"level": kitem["level"],
|
"level": kitem["level"],
|
||||||
})
|
})
|
||||||
DBSA.flush()
|
DBSA.flush()
|
||||||
if rollback[0]:
|
|
||||||
db.rollback_l0(rollback[0])
|
|
||||||
if rollback[1]:
|
|
||||||
db.rollback_l1(rollback[1])
|
|
||||||
if rollback[2]:
|
|
||||||
db.rollback_l2(rollback[2])
|
|
||||||
time.sleep(10)
|
|
||||||
|
|
||||||
def parse_args() -> argparse.Namespace:
|
def parse_args() -> argparse.Namespace:
|
||||||
global MACHINE_ID, MAX_WORKERS
|
global MACHINE_ID, MAX_WORKERS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user