新增错误重试

This commit is contained in:
shenjian@fangjia.com
2023-04-24 18:23:40 +08:00
parent 9c07c89801
commit 2f7478f017
@@ -66,7 +66,8 @@ def calc_price_rating(city=None):
action = {'_op_type': 'update',
'_index': index_name,
'_id': _id, # 请勿忘记ID
'doc': row}
'doc': row,
"_retry_on_conflict": 5}
actions.append(action)
if len(actions) == 5000:
helpers.bulk(client=es206_client.elastic_client, actions=actions)