新增周边配套同步
This commit is contained in:
@@ -62,15 +62,15 @@ def deal(actions, item):
|
|||||||
try:
|
try:
|
||||||
helpers.bulk(es206_client.elastic_client, actions)
|
helpers.bulk(es206_client.elastic_client, actions)
|
||||||
count += len(actions)
|
count += len(actions)
|
||||||
print("更新:" + str(count))
|
log.info("更新:" + str(count))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
log.error(e)
|
||||||
actions.clear()
|
actions.clear()
|
||||||
mutex.release()
|
mutex.release()
|
||||||
|
|
||||||
|
|
||||||
def sync(city=None):
|
def sync(city=None):
|
||||||
log.info(f"开始同步周边配套至206 {index_name}")
|
log.info(f"开始同步交通至206 {index_name}")
|
||||||
seaweed_query = {'status': 0, 'cat': 'district'}
|
seaweed_query = {'status': 0, 'cat': 'district'}
|
||||||
if pd.notna(city):
|
if pd.notna(city):
|
||||||
seaweed_query['city'] = city
|
seaweed_query['city'] = city
|
||||||
@@ -93,4 +93,4 @@ def sync(city=None):
|
|||||||
print(e)
|
print(e)
|
||||||
actions.clear()
|
actions.clear()
|
||||||
|
|
||||||
log.info(f"完成同步周边配套至206 {index_name}")
|
log.info(f"完成同步交通至206 {index_name}")
|
||||||
Reference in New Issue
Block a user