Commit 0a83ea39 authored by Leo Gordon's avatar Leo Gordon
Browse files

bugfix: -job_limit now works correctly also with respecializing workers

parent d05ffb98
......@@ -522,11 +522,12 @@ sub run {
} else {
my $desired_batch_size = $self->analysis->stats->get_or_estimate_batch_size();
$desired_batch_size = $self->job_limiter->preliminary_offer( $desired_batch_size );
$self->job_limiter->final_decision( $desired_batch_size );
my $actual_batch = $job_adaptor->grab_jobs_for_worker( $self, $desired_batch_size );
if(scalar(@$actual_batch)) {
$jobs_done_by_batches_loop += $self->run_one_batch( $actual_batch );
my $jobs_done_by_this_batch = $self->run_one_batch( $actual_batch );
$jobs_done_by_batches_loop += $jobs_done_by_this_batch;
$self->job_limiter->final_decision( $jobs_done_by_this_batch );
} else {
$self->cause_of_death('NO_WORK');
}
......
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