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

added get_hive_current_load() check in the Queen:create_new_worker method

to prevent excessive workers from saturating the system.
parent 9e1712e1
......@@ -94,6 +94,8 @@ sub create_new_worker {
my $analStatsDBA = $self->db->get_AnalysisStatsAdaptor;
return undef unless($analStatsDBA);
return undef if($self->get_hive_current_load() >= 1.0);
unless($analysis_id) {
my ($anal_stats) = @{$analStatsDBA->fetch_by_needed_workers(1)};
return undef unless($anal_stats);
......
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