Skip to content

Commit

Permalink
Add ASSIGNED jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
linguini-dev committed Nov 29, 2024
1 parent 86a4887 commit 3077304
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/publiccloud/azure_aitl.pm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ sub run {
# Wait a few seconds to give Azure time to create the jobs
sleep(10);

my $status = script_output(qq(python3.11 /tmp/aitl.py job get $aitl_get_options -q "properties.results[].status|{RUNNING:length([?@=='RUNNING']),QUEUED:length([?@=='QUEUED'])}"));
my $status = script_output(qq(python3.11 /tmp/aitl.py job get $aitl_get_options -q "properties.results[].status|{RUNNING:length([?@=='RUNNING']),QUEUED:length([?@=='QUEUED']),ASSIGNED:length([?@=='ASSIGNED'])}"));

# Remove the first two non-JSON lines from the status JSON.
$status =~ s/^(?:.*\n){1,3}//;
Expand All @@ -72,7 +72,7 @@ sub run {
# The goal of the loop is to check there are no Jobs Queued or currently Running.
while ($status_data->{RUNNING} > 0 || $status_data->{QUEUED} > 0 || $status_data->{ASSIGNED} > 0) {
sleep(30);
$status = script_output(qq(python3.11 /tmp/aitl.py job get $aitl_get_options -q "properties.results[].status|{RUNNING:length([?@=='RUNNING']),QUEUED:length([?@=='QUEUED'])}"));
$status = script_output(qq(python3.11 /tmp/aitl.py job get $aitl_get_options -q "properties.results[].status|{RUNNING:length([?@=='RUNNING']),QUEUED:length([?@=='QUEUED']),ASSIGNED:length([?@=='ASSIGNED'])}"));
$status =~ s/^(?:.*\n){1,3}//;
$status_data = decode_json($status);
print("Unfinished AITL Jobs! Running:", $status_data->{RUNNING}, " QUEUED: ", $status_data->{QUEUED}, " ASSIGNED: ", $status_data->{ASSIGNED});
Expand Down

0 comments on commit 3077304

Please sign in to comment.