feat: get_batch_dag节点排序改动

This commit is contained in:
caoqianming 2025-03-31 15:11:43 +08:00
parent 0b76602c84
commit 146fe6641f
1 changed files with 2 additions and 2 deletions

View File

@ -944,7 +944,7 @@ def get_batch_dag(batch_number: str):
# 查询所有与当前批次相关的记录作为source或target
logs = BatchLog.objects.filter(Q(source__id__in=nodes_set) | Q(target__id__in=nodes_set)).select_related(
"source", "target"
).order_by("create_time")
).order_by("update_time")
# 处理每条记录,扩展节点和边
for log in logs:
source = log.source.id
@ -964,7 +964,7 @@ def get_batch_dag(batch_number: str):
# unique_edges[key] = edge
# 将批次号排序
nodes_qs = BatchSt.objects.filter(id__in=nodes_set).order_by('id')
nodes_qs = BatchSt.objects.filter(id__in=nodes_set).order_by('update_time')
# batch_to_id = {batch: idx for idx, batch in enumerate(nodes_list)}
# 构建节点数据,默认使用'rect'形状