From 1a6cce9647aaf97b20159220c011bc1c20abbf94 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 14 Sep 2012 08:05:16 +0000 Subject: [PATCH] svn path=/trunk/boinc/; revision=26113 --- tools/ict_job | 3 +-- tools/remote_submit | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/tools/ict_job b/tools/ict_job index 84ec92eb21..ea79858a64 100755 --- a/tools/ict_job +++ b/tools/ict_job @@ -5,7 +5,7 @@ // from the Institute for Computing Technology in Beijing // -define("PROJECT", "http://casbak.ihep.ac.cn/casw/"); +define("PROJECT", "http://casathome.ihep.ac.cn/"); function usage() { global $argv; @@ -43,7 +43,6 @@ function handle_submit() { global $argc, $argv; if ($argc != 3) usage(); if (!is_file($argv[2])) die("seq file missing"); - //$auth = $argv[3]; $auth = get_auth(); $req_xml = " diff --git a/tools/remote_submit b/tools/remote_submit index 23eb5a993a..638f5667df 100755 --- a/tools/remote_submit +++ b/tools/remote_submit @@ -77,6 +77,17 @@ function print_batch($batch) { "; } +function print_state($batch) { + $status="none"; + switch ($batch->state) { + case 1: $status = "In progress";break; + case 2: $status = "Completed";break; + case 3: $status = "Aborted";break; + case 4: $status = "Retired";break; + } + echo "ID: $batch->id $status\n"; +} + function handle_query() { global $argc, $argv; if ($argc != 3) usage(); @@ -90,20 +101,23 @@ function handle_query() { } if ($argv[2] == 'all') { foreach ($batches as $batch) { - print_batch($batch); + //print_batch($batch); + print_state($batch); } } else if (is_numeric($argv[2])) { $batch_id = $argv[2]; foreach ($batches as $batch) { if ($batch->id == $batch_id) { - print_batch($batch); + //print_batch($batch); + print_state($batch); } } } else { $app_name = $argv[2]; foreach ($batches as $batch) { if ($batch->app_name == $app_name) { - print_batch($batch); + //print_batch($batch); + print_state($batch); } } }