diff --git a/apiserver/bll/event/history_debug_image_iterator.py b/apiserver/bll/event/history_debug_image_iterator.py index 08014cc..88878be 100644 --- a/apiserver/bll/event/history_debug_image_iterator.py +++ b/apiserver/bll/event/history_debug_image_iterator.py @@ -242,7 +242,7 @@ class HistoryDebugImageIterator: ] es_req = { "size": 1, - "sort": [{"iter": order}, {"metric": order}, {"variant": order}], + "sort": [{"iter": order}, {"metric": order}, {"variant": order}, {"url": "desc"}], "query": {"bool": {"must": must_conditions}}, } es_res = search_company_events( @@ -338,7 +338,7 @@ class HistoryDebugImageIterator: es_req = { "size": 1, - "sort": {"iter": "desc"}, + "sort": [{"iter": "desc"}, {"url": "desc"}], "query": {"bool": {"must": must_conditions}}, } diff --git a/apiserver/database/model/task/task.py b/apiserver/database/model/task/task.py index 5d220a7..14f5c16 100644 --- a/apiserver/database/model/task/task.py +++ b/apiserver/database/model/task/task.py @@ -233,7 +233,7 @@ class Task(AttributedDocument): "execution.queue", "models.input.model", ), - range_fields=("started", "active_duration", "last_metrics.*", "last_iteration"), + range_fields=("created", "started", "active_duration", "last_metrics.*", "last_iteration"), datetime_fields=("status_changed", "last_update"), pattern_fields=("name", "comment", "report"), fields=("runtime.*",),