优化报错
This commit is contained in:
@@ -74,18 +74,12 @@ def sync(city=None):
|
|||||||
|
|
||||||
actions.append(action)
|
actions.append(action)
|
||||||
if len(actions) == 5000:
|
if len(actions) == 5000:
|
||||||
try:
|
helpers.bulk(es206_client.elastic_client, actions)
|
||||||
helpers.bulk(es206_client.elastic_client, actions)
|
count += len(actions)
|
||||||
count += len(actions)
|
log.info("已更新:" + str(count))
|
||||||
print("已更新:" + str(count))
|
|
||||||
except Exception as e:
|
|
||||||
print(e)
|
|
||||||
actions.clear()
|
actions.clear()
|
||||||
if len(actions) > 0:
|
if len(actions) > 0:
|
||||||
try:
|
helpers.bulk(es206_client.elastic_client, actions)
|
||||||
helpers.bulk(es206_client.elastic_client, actions)
|
|
||||||
except Exception as 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