Skip to content
Snippets Groups Projects
Commit 83e14500 authored by Jessica Severin's avatar Jessica Severin
Browse files

fixed bug in batch_size when worker has specified job_limit. Code accidentally

stored truncated batch_size (when job_limit < batch_size).  Fixed with a
'smart' worker->batch_size method which returns the lesser of either the
analysis->stats->batch_size or worker->job_limit
parent 74b07443
No related branches found
No related tags found
No related merge requests found
......@@ -174,12 +174,7 @@ sub life_span {
sub job_limit {
my $self=shift;
if(@_) {
$self->{'_job_limit'}=shift;
if($self->{'_job_limit'} < $self->batch_size) {
$self->batch_size($self->{'_job_limit'});
}
}
$self->{'_job_limit'}=shift if(@_);
return $self->{'_job_limit'};
}
......@@ -298,7 +293,11 @@ sub batch_size {
$stats->batch_size($batch_size);
$stats->update;
}
return $self->analysis->stats->batch_size;
my $batch_size = $self->analysis->stats->batch_size;
if($self->job_limit < $batch_size) {
$batch_size = $self->job_limit;
}
return $batch_size;
}
......
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