Commit 1086a637 authored by Jessica Severin's avatar Jessica Severin
Browse files

extended the Queen::print_hive_status to also show counts and types of

workers currently running
parent 5f956e8e
...@@ -354,6 +354,18 @@ sub print_hive_status ...@@ -354,6 +354,18 @@ sub print_hive_status
foreach my $analysis_stats (@{$allStats}) { foreach my $analysis_stats (@{$allStats}) {
$analysis_stats->print_stats; $analysis_stats->print_stats;
} }
print("HIVE LIVE WORKERS====\n");
my $sql = "select logic_name, count(*) from hive, analysis ".
"where hive.analysis_id=analysis.analysis_id and hive.cause_of_death='' ".
"group by hive.analysis_id";
my $sth = $self->prepare($sql);
$sth->execute();
while((my $logic_name, my $count)=$sth->fetchrow_array()) {
printf("%20s : %d workers\n", $logic_name, $count);
}
print("=====================\n");
$sth->finish;
} }
......
...@@ -220,7 +220,8 @@ sub run_autonomously { ...@@ -220,7 +220,8 @@ sub run_autonomously {
$queen->update_analysis_stats(); $queen->update_analysis_stats();
$queen->check_blocking_control_rules; $queen->check_blocking_control_rules;
$queen->print_hive_status();
my $load = $queen->get_hive_current_load(); my $load = $queen->get_hive_current_load();
my $count = $queen->get_num_needed_workers(); my $count = $queen->get_num_needed_workers();
......
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