From 69b71590b39b32ab1b1bba1bd78bd76584be7b83 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 21 Sep 2012 15:42:39 +0200 Subject: [PATCH] Implemented "bex queue --attn" --- lib/bin/bex-queue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/bin/bex-queue b/lib/bin/bex-queue index 9b01a4e..d98f8dc 100755 --- a/lib/bin/bex-queue +++ b/lib/bin/bex-queue @@ -14,6 +14,7 @@ my $op_rm; my $op_move_to; my $queue_name; +my $attention; my $filenames; my $given_job; my $summary; @@ -30,6 +31,7 @@ Actions: --move-to= Move jobs to a different queue Options: +-a, --attn Show jobs needing attention (e.g., failures) -f, --filenames Show filenames of jobs and log files -j, --job= Act on the specified job (default: on all) -q, --queue= Act on the given queue @@ -45,6 +47,7 @@ GetOptions( "h|by-host!" => \$op_by_host, "rm!" => \$op_rm, "move-to=s" => \$op_move_to, + "a|attn!" => \$attention, "f|filenames!" => \$filenames, "j|job=s" => \$given_job, "q|queue=s" => \$queue_name, @@ -93,6 +96,7 @@ sub do_ls() for my $j (@{$machs{$m}}) { my $st = $queue->read_job_status($m, $j); my $s = $st->{"Status"} // "UNKNOWN"; + if ($attention) { next if $s =~ m{^(NEW|NOPING)$}; } $cnt_by_job{$j}{$s}++; $cnt_by_mach{$m}{$s}++; $why{$m}{$j} = ""; -- 2.39.5