Fix not all the event logs are returned from sharded ES

This commit is contained in:
allegroai 2022-05-20 15:11:05 +03:00
parent fb256d7e5b
commit 08a7bc7c9f
2 changed files with 0 additions and 4 deletions

View File

@ -1036,7 +1036,6 @@ class EventBLL(object):
company_id=company_id,
event_type=EventType.task_log,
body=es_req,
routing=task_id,
refresh=True,
)
return es_res.get("deleted", 0)

View File

@ -81,7 +81,6 @@ class EventsIterator:
company_id=company_id,
event_type=event_type,
body=es_req,
routing=task_id,
)
return es_result["count"]
@ -122,7 +121,6 @@ class EventsIterator:
company_id=company_id,
event_type=event_type,
body=es_req,
routing=task_id,
)
hits = es_result["hits"]["hits"]
hits_total = es_result["hits"]["total"]["value"]
@ -146,7 +144,6 @@ class EventsIterator:
company_id=company_id,
event_type=event_type,
body=es_req,
routing=task_id,
)
last_second_hits = es_result["hits"]["hits"]
if not last_second_hits or len(last_second_hits) < 2: