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

View of /FigKernelScripts/svr_kill_RAST_job.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

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

#
# Usage: svr_kill_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->kill_RAST_job( { -job => \@jobs } );

for my $job (@jobs)
{
    my $jdat = $res->{$job};
    my $status = $jdat->{status};
    my $err_msg = "(error message: $jdat->{error_msg})" if $status eq 'error';
    print "Status from killing job $job: $status $err_msg\n";
    if ($verbose)
    {
	print "\t$_\n" for @{$jdat->{messages}};
	print "\n";
    }
}

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3