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