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

moved Q:print_running_worker_counts --> RA:print_active_role_counts

parent 01a4a985
......@@ -102,5 +102,30 @@ sub count_active_roles {
}
sub print_active_role_counts {
my $self = shift;
my $sql = qq{
SELECT logic_name, count(*)
FROM role
JOIN analysis_base a USING(analysis_id)
WHERE when_finished IS NULL
GROUP BY a.analysis_id
};
my $total_roles = 0;
my $sth = $self->prepare($sql);
$sth->execute();
print "\n===== Stats of active Roles as recorded in the pipeline database: ======\n";
while(my ($logic_name, $active_role_count) = $sth->fetchrow_array()) {
printf("%30s : %d active Roles\n", $logic_name, $active_role_count);
$total_roles += $active_role_count;
}
$sth->finish;
printf("%30s : %d active Roles\n\n", '======= TOTAL =======', $total_roles);
}
1;
......@@ -707,31 +707,6 @@ sub print_analysis_status {
}
sub print_running_worker_counts {
my $self = shift;
my $sql = qq{
SELECT logic_name, count(*)
FROM worker w
JOIN analysis_base a USING(analysis_id)
WHERE w.status!='DEAD'
GROUP BY a.analysis_id
};
my $total_workers = 0;
my $sth = $self->prepare($sql);
$sth->execute();
print "\n===== Stats of live Workers according to the Queen: ======\n";
while((my $logic_name, my $worker_count)=$sth->fetchrow_array()) {
printf("%30s : %d workers\n", $logic_name, $worker_count);
$total_workers += $worker_count;
}
$sth->finish;
printf("%30s : %d workers\n\n", '======= TOTAL =======', $total_workers);
}
=head2 register_all_workers_dead
Example : $queen->register_all_workers_dead();
......
......@@ -266,7 +266,7 @@ sub main {
print $worker->toString()."\n";
}
}
$queen->print_running_worker_counts;
$self->{'dba'}->get_RoleAdaptor->print_active_role_counts;
Bio::EnsEMBL::Hive::Scheduler::schedule_workers_resync_if_necessary($queen, $valley, $analysis); # show what would be submitted, but do not actually submit
$queen->get_remaining_jobs_show_hive_progress();
......@@ -350,7 +350,7 @@ sub run_autonomously {
$queen->check_for_dead_workers($valley, 0);
$queen->print_analysis_status unless($self->{'no_analysis_stats'});
$queen->print_running_worker_counts;
$self->{'dba'}->get_RoleAdaptor->print_active_role_counts;
my $workers_to_submit_by_meadow_type_rc_name
= Bio::EnsEMBL::Hive::Scheduler::schedule_workers_resync_if_necessary($queen, $valley, $run_analysis);
......
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