优化
This commit is contained in:
@@ -14,7 +14,7 @@ def sync(province):
|
|||||||
index="didata_company",
|
index="didata_company",
|
||||||
body={"index": {"refresh_interval": "-1"}}
|
body={"index": {"refresh_interval": "-1"}}
|
||||||
)
|
)
|
||||||
ids = DIDATA_DEV_ELASTIC_CLIENT.scan_by_sql_to_data_frame(f"select company_name from didata_company where province='{province}'")
|
ids = DIDATA_DEV_ELASTIC_CLIENT.scan_by_sql_to_data_frame(f"select company_name, committee from didata_company where province='{province}'")
|
||||||
if len(ids) > 0:
|
if len(ids) > 0:
|
||||||
company_ids = ids['_id'].to_list()
|
company_ids = ids['_id'].to_list()
|
||||||
else:
|
else:
|
||||||
@@ -92,6 +92,9 @@ def sync(province):
|
|||||||
body={"index": {"refresh_interval": "5s"}}
|
body={"index": {"refresh_interval": "5s"}}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
flag = False
|
||||||
for province in areautils.get_all_province():
|
for province in areautils.get_all_province():
|
||||||
sync(province)
|
if '西藏自治区' == province:
|
||||||
|
flag = True
|
||||||
|
if flag:
|
||||||
|
sync(province)
|
||||||
Reference in New Issue
Block a user