From 27b719696121d9946857ea08b67076203e996f4e Mon Sep 17 00:00:00 2001 From: serxa Date: Sat, 3 Jun 2023 15:17:05 +0000 Subject: [PATCH] reply on job_id instead of job name --- utils/async_loader_graph | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/utils/async_loader_graph b/utils/async_loader_graph index 04e6d385782..5bd4aba41ee 100755 --- a/utils/async_loader_graph +++ b/utils/async_loader_graph @@ -18,14 +18,13 @@ CLICKHOUSE_CLIENT="$@" echo 'digraph {' echo 'rankdir=LR;' -$CLICKHOUSE_CLIENT --query='select job, status, is_blocked, is_ready, is_executing, pool, dependencies from system.async_loader FORMAT JSON' \ +$CLICKHOUSE_CLIENT --query='select job, job_id, status, is_blocked, is_ready, is_executing, pool, dependencies from system.async_loader FORMAT JSON' \ | jq -r ' - def nodeId: gsub(" "; "_") | gsub("\\."; "__"); .data[] | { "FgLoad": "box", "BgLoad": "hexagon", "BgStartup": "ellipse" } as $shape | { "PENDING": "white", "OK": "lightgreen", "FAILED": "red", "CANCELED": "darkred" } as $fillcolor | [ "black", "blue", "orange", "yellow" ] as $color - | (.job | nodeId) as $self + | (.job_id | tostring) as $self | [ # Nodes $self + " [label=\"" + .job + @@ -35,7 +34,7 @@ $CLICKHOUSE_CLIENT --query='select job, status, is_blocked, is_ready, is_executi "\"];", # Edges - (.dependencies[] | ($self + " -> " + (. | nodeId) + ";")) + (.dependencies[] | ($self + " -> " + (. | tostring) + ";")) ] | join("\n") '