[Bio] / FigKernelScripts / svr_status_of_RAST_job.pl Repository:
ViewVC logotype

View of /FigKernelScripts/svr_status_of_RAST_job.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (download) (as text) (annotate)
Thu Oct 22 21:15:13 2009 UTC (10 years, 7 months ago) by olson
Branch: MAIN
Changes since 1.1: +18 -1 lines
Lastest code. working submissions, plus kill & delete job.


use RASTserver;
use strict;
use Getopt::Long;

#
# Usage: svr_status_of_RAST_job username password jobid [, jobid...]
#

my $usage = "Usage: $0 [--verbose] username password jobid [ jobid jobid ... ]\n";

my $verbose;
if (!GetOptions('verbose' => \$verbose))
{
    die $usage;
}

@ARGV > 2 or die $usage;

my $username = shift;
my $password = shift;

my @jobs = @ARGV;

my $rast = new RASTserver($username, $password);

my $res = $rast->status_of_RAST_job( { -job => \@jobs } );

for my $job (@jobs)
{
    my $status_hash = $res->{$job};
    my $status = $status_hash->{status};
    my $err_msg = "(error message: $status_hash->{error_msg})" if $status eq 'error';
    print "status for job $job: $status $err_msg\n";
    if ($verbose)
    {
	for my $vs (@{$status_hash->{verbose_status}})
	{
	    my($s, $v) = @$vs;
	    print "$s: $v\n";
	}
    }
}

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3