Skip to content
Snippets Groups Projects
Commit fa74bae1 authored by Morris Jette's avatar Morris Jette Committed by Danny Auble
Browse files

Sanity check in perl api to make sure we get a new structure back from the

perl api.
parent 990eb2e0
No related branches found
No related tags found
No related merge requests found
......@@ -91,7 +91,9 @@ Main:
# Use sole remaining argument as nodeIds
my @nodeIds = @ARGV;
my $slurm = Slurm::new();
if (!$slurm) {
die "Problem loading slurm.\n";
}
# handle all of the node update operations
if ( defined $clear || defined $offline || defined $reset ) {
......
......@@ -73,6 +73,9 @@ if (@ARGV < 1) {
pod2usage(-message=>"Missing Job ID", -verbose=>0);
} else {
$slurm = Slurm::new();
if (!$slurm) {
die "Problem loading slurm.\n";
}
$resp = $slurm->get_end_time($job_id);
if (not defined($resp)) {
pod2usage(-message=>"Job id $job_id not valid!", -verbose=>0);
......
......@@ -418,6 +418,9 @@ if ($interactive) {
# If block is true wait for the job to finish
my($resp, $count);
my $slurm = Slurm::new();
if (!$slurm) {
die "Problem loading slurm.\n";
}
if ( (lc($block) eq "true" ) and ($command_exit_status == 0) ) {
sleep 2;
my($job) = $slurm->load_job($job_id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment