新增错误重试
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user