diff --git a/dags/business/business/community/total_price_complete.py b/dags/business/business/community/total_price_complete.py index 43bc002..84ea5fc 100644 --- a/dags/business/business/community/total_price_complete.py +++ b/dags/business/business/community/total_price_complete.py @@ -41,23 +41,18 @@ def sync(): "_op_type": "update", "_index": index_name, "_id": item['_id'], - "doc": doc_info + "doc": doc_info, + "_retry_on_conflict": 5 } actions.append(action) if len(actions) == 5000: - try: - helpers.bulk(es206_client.elastic_client, actions) - count += len(actions) - logging.info("已补全:" + str(count)) - except Exception as e: - log.error(e) + helpers.bulk(es206_client.elastic_client, actions) + count += len(actions) + logging.info("已补全:" + str(count)) actions.clear() if len(actions) > 0: - try: - helpers.bulk(es206_client.elastic_client, actions) - except Exception as e: - log.error(e) + helpers.bulk(es206_client.elastic_client, actions) actions.clear() log.info(f"完成补全户均总价信息至206 {index_name}")