mirror of
https://github.com/clearml/clearml-server
synced 2025-01-31 10:56:48 +00:00
Fix getting empty metrics from task
This commit is contained in:
parent
7f00672010
commit
294da32401
@ -450,14 +450,14 @@ class EventMetrics:
|
|||||||
|
|
||||||
def get_tasks_metrics(
|
def get_tasks_metrics(
|
||||||
self, company_id, task_ids: Sequence, event_type: EventType
|
self, company_id, task_ids: Sequence, event_type: EventType
|
||||||
) -> Sequence:
|
) -> Sequence[Tuple]:
|
||||||
"""
|
"""
|
||||||
For the requested tasks return all the metrics that
|
For the requested tasks return all the metrics that
|
||||||
reported events of the requested types
|
reported events of the requested types
|
||||||
"""
|
"""
|
||||||
es_index = EventMetrics.get_index_name(company_id, event_type.value)
|
es_index = EventMetrics.get_index_name(company_id, event_type.value)
|
||||||
if not self.es.indices.exists(es_index):
|
if not self.es.indices.exists(es_index):
|
||||||
return {}
|
return [(tid, []) for tid in task_ids]
|
||||||
|
|
||||||
max_concurrency = config.get("services.events.max_metrics_concurrency", 4)
|
max_concurrency = config.get("services.events.max_metrics_concurrency", 4)
|
||||||
with ThreadPoolExecutor(max_concurrency) as pool:
|
with ThreadPoolExecutor(max_concurrency) as pool:
|
||||||
|
Loading…
Reference in New Issue
Block a user