Commit d6237f49 authored by Leo Gordon's avatar Leo Gordon
Browse files

return immediately if honeycomb_dir not defined

parent 54c1585a
......@@ -505,17 +505,19 @@ sub output {
sub check_if_exit_cleanly {
my $self = shift;
my $id = $self->input_job->dbID;
my $honeycomb_dir = $self->{'honeycomb_dir'};
my $honeycomb_dir = $self->{'honeycomb_dir'} or return;
$honeycomb_dir =~ s/\/$//;
my $not_allowed = $honeycomb_dir . "/" . "relegate." . $id;
my $job_id = $self->input_job->dbID;
my $not_allowed = $honeycomb_dir . "/" . "relegate." . $job_id;
my $exit_cleanly = $honeycomb_dir . "/" . "relegate.all";
if (-e $not_allowed) {
$self->update_status('FAILED');
throw("This job has been relegated to be killed - $id\n");
throw("This job has been relegated to be killed - $job_id\n");
} elsif (-e $exit_cleanly) {
$self->update_status('READY');
throw("This job has been relegated to be exited - $id\n");
throw("This job has been relegated to be exited - $job_id\n");
}
return undef;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment