Commit e819451a authored by Jessica Severin's avatar Jessica Severin
Browse files

added method get_num_running_workers which just returns a count.

used by lsf_beekeeper to decide when it needs to do a hard resync.
parent d9e80329
...@@ -372,6 +372,18 @@ sub get_hive_current_load { ...@@ -372,6 +372,18 @@ sub get_hive_current_load {
} }
sub get_num_running_workers {
my $self = shift;
my $sql = "SELECT count(*) FROM hive WHERE cause_of_death =''";
my $sth = $self->prepare($sql);
$sth->execute();
(my $runningCount)=$sth->fetchrow_array();
$sth->finish;
$runningCount=0 unless($runningCount);
print("current hive num_running_workers = $runningCount\n");
return $runningCount;
}
=head2 get_num_needed_workers =head2 get_num_needed_workers
Example : $count = $queen->get_num_needed_workers(); Example : $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