Skip to content
Snippets Groups Projects
Commit 0a83ea39 authored by Leo Gordon's avatar Leo Gordon
Browse files

bugfix: -job_limit now works correctly also with respecializing workers

parent d05ffb98
No related branches found
No related tags found
No related merge requests found
...@@ -522,11 +522,12 @@ sub run { ...@@ -522,11 +522,12 @@ sub run {
} else { } else {
my $desired_batch_size = $self->analysis->stats->get_or_estimate_batch_size(); my $desired_batch_size = $self->analysis->stats->get_or_estimate_batch_size();
$desired_batch_size = $self->job_limiter->preliminary_offer( $desired_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 ); my $actual_batch = $job_adaptor->grab_jobs_for_worker( $self, $desired_batch_size );
if(scalar(@$actual_batch)) { 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 { } else {
$self->cause_of_death('NO_WORK'); $self->cause_of_death('NO_WORK');
} }
......
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