diff --git a/modules/Bio/EnsEMBL/Hive/AnalysisStats.pm b/modules/Bio/EnsEMBL/Hive/AnalysisStats.pm index f424579f873dc6aaae1429005f70fc45efb73dab..c9525652aae49dacf3a861e041440b652d3e8ab9 100644 --- a/modules/Bio/EnsEMBL/Hive/AnalysisStats.pm +++ b/modules/Bio/EnsEMBL/Hive/AnalysisStats.pm @@ -403,10 +403,10 @@ sub determine_status { my $absolute_tolerance = $analysis->failed_job_tolerance * $self->total_job_count / 100.0; if ($self->failed_job_count > $absolute_tolerance) { $self->status('FAILED'); - print "\n##################################################\n"; - printf("## ERROR: %-35s ##\n", $analysis->logic_name." failed!"); - printf("## %d jobs failed (tolerance: %d (%3d%%)) ##\n", $self->failed_job_count, $absolute_tolerance, $analysis->failed_job_tolerance); - print "##################################################\n\n"; + warn "\n##################################################\n"; + warn sprintf("## ERROR: %-35s ##\n", $analysis->logic_name." failed!"); + warn sprintf("## %d jobs failed (tolerance: %d (%3d%%)) ##\n", $self->failed_job_count, $absolute_tolerance, $analysis->failed_job_tolerance); + warn "##################################################\n\n"; } else { $self->status('DONE'); } diff --git a/modules/Bio/EnsEMBL/Hive/Queen.pm b/modules/Bio/EnsEMBL/Hive/Queen.pm index 67627eafb60c0e8f2e9d0476d261ab030efde996..c9b15c0030166e5d6c06772ab54e09fbc6326aa8 100644 --- a/modules/Bio/EnsEMBL/Hive/Queen.pm +++ b/modules/Bio/EnsEMBL/Hive/Queen.pm @@ -738,7 +738,7 @@ sub get_remaining_jobs_show_hive_progress { ? ((100.0 * ($done+$failed))/$total) : 0.0; my $remaining = $total - $done - $failed; - printf("hive %1.3f%% complete (< %1.3f CPU_hrs) (%d todo + %d done + %d failed = %d total)\n", + warn sprintf("hive %1.3f%% complete (< %1.3f CPU_hrs) (%d todo + %d done + %d failed = %d total)\n", $completed, $cpuhrs, $remaining, $done, $failed, $total); return $remaining; }