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

send the fatal "COULDNT CREATE WORKER" message to stderr instead of stdout

parent 35458247
......@@ -137,7 +137,8 @@ sub create_new_worker {
eval {
make_path( $worker_log_dir );
} and die "Could not create '$worker_log_dir' directory : $@";
1;
} or die "Could not create '$worker_log_dir' directory : $@";
my $sth_add_log = $self->prepare( "UPDATE worker SET log_dir=? WHERE worker_id=?" );
$sth_add_log->execute($worker_log_dir, $worker_id);
......
......@@ -106,30 +106,23 @@ eval {
# Other parameters:
-debug => $debug,
);
};
my $msg_thrown = $@;
if($worker) {
} or do {
my $specialization_arglist = ($analysis_id || $logic_name || $job_id) && [
-analysis_id => $analysis_id,
-logic_name => $logic_name,
-job_id => $job_id,
-force => $force,
];
my $msg_thrown = $@;
$queen->print_analysis_status;
die "\n=== COULDN'T CREATE WORKER ===\n\t$msg_thrown";
};
$worker->run( $specialization_arglist );
} else {
my $specialization_arglist = ($analysis_id || $logic_name || $job_id) && [
-analysis_id => $analysis_id,
-logic_name => $logic_name,
-job_id => $job_id,
-force => $force,
];
$queen->print_analysis_status;
print "\n=== COULDN'T CREATE WORKER ===\n";
if($msg_thrown) {
print "$msg_thrown\n";
}
exit(1);
}
$worker->run( $specialization_arglist );
__DATA__
......
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