mirror of
https://github.com/clearml/clearml-server
synced 2025-01-31 10:56:48 +00:00
Fix version conflicts when deleting task events cause an error
This commit is contained in:
parent
447adb9090
commit
a25cd5dae8
@ -66,7 +66,9 @@ def delete_company_events(
|
|||||||
es: Elasticsearch, company_id: str, event_type: EventType, body: dict, **kwargs
|
es: Elasticsearch, company_id: str, event_type: EventType, body: dict, **kwargs
|
||||||
) -> dict:
|
) -> dict:
|
||||||
es_index = get_index_name(company_id, event_type.value)
|
es_index = get_index_name(company_id, event_type.value)
|
||||||
return es.delete_by_query(index=es_index, body=body, **kwargs)
|
return es.delete_by_query(
|
||||||
|
index=es_index, body=body, conflicts="proceed", **kwargs
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def count_company_events(
|
def count_company_events(
|
||||||
@ -76,9 +78,7 @@ def count_company_events(
|
|||||||
return es.count(index=es_index, body=body, **kwargs)
|
return es.count(index=es_index, body=body, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def get_metric_variants_condition(
|
def get_metric_variants_condition(metric_variants: MetricVariants,) -> Sequence:
|
||||||
metric_variants: MetricVariants,
|
|
||||||
) -> Sequence:
|
|
||||||
conditions = [
|
conditions = [
|
||||||
{
|
{
|
||||||
"bool": {
|
"bool": {
|
||||||
|
@ -10,12 +10,12 @@ from typing import (
|
|||||||
from redis import StrictRedis
|
from redis import StrictRedis
|
||||||
|
|
||||||
from apiserver.config_repo import config
|
from apiserver.config_repo import config
|
||||||
|
from apiserver.database.model.model import Model
|
||||||
|
from apiserver.database.model.task.task import Task
|
||||||
from apiserver.redis_manager import redman
|
from apiserver.redis_manager import redman
|
||||||
from apiserver.utilities.dicts import nested_get
|
from apiserver.utilities.dicts import nested_get
|
||||||
from apiserver.utilities.parameter_key_escaper import ParameterKeyEscaper
|
from apiserver.utilities.parameter_key_escaper import ParameterKeyEscaper
|
||||||
from .sub_projects import _ids_with_children
|
from .sub_projects import _ids_with_children
|
||||||
from ...database.model.model import Model
|
|
||||||
from ...database.model.task.task import Task
|
|
||||||
|
|
||||||
log = config.logger(__file__)
|
log = config.logger(__file__)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user