mirror of
https://github.com/clearml/clearml-server
synced 2025-03-03 10:43:10 +00:00
Fix batch events counting
This commit is contained in:
parent
018582ff8a
commit
eb4c9f0b13
@ -206,7 +206,7 @@ class EventBLL(object):
|
|||||||
) as it:
|
) as it:
|
||||||
for success, info in it:
|
for success, info in it:
|
||||||
if success:
|
if success:
|
||||||
added += chunk_size
|
added += 1
|
||||||
else:
|
else:
|
||||||
errors_per_type["Error when indexing events batch"] += 1
|
errors_per_type["Error when indexing events batch"] += 1
|
||||||
|
|
||||||
@ -233,9 +233,6 @@ class EventBLL(object):
|
|||||||
remaining_tasks, company_id, last_update=now
|
remaining_tasks, company_id, last_update=now
|
||||||
)
|
)
|
||||||
|
|
||||||
# Compensate for always adding chunk_size on success (last chunk is probably smaller)
|
|
||||||
added = min(added, len(actions))
|
|
||||||
|
|
||||||
if not added:
|
if not added:
|
||||||
raise errors.bad_request.EventsNotAdded(**errors_per_type)
|
raise errors.bad_request.EventsNotAdded(**errors_per_type)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user