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

introduced the concept of original_capacity()

parent c65e87f3
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,8 @@ sub new {
my $self = bless {}, $class;
$self->description( $description );
$self->original_capacity( $available_capacity );
$self->available_capacity( $available_capacity );
# we fix the multiplier at 1 for direct limiters, but expect it to be (re)set later by reciprocal limiters:
......@@ -58,6 +60,16 @@ sub description {
}
sub original_capacity {
my $self = shift @_;
if(@_) {
$self->{_original_capacity} = shift @_;
}
return $self->{_original_capacity};
}
sub available_capacity {
my $self = shift @_;
......
......@@ -180,7 +180,7 @@ sub schedule_workers {
foreach my $analysis_stats (@stats_sorted_by_suitability) {
if( $submit_capacity_limiter->reached ) {
if( $analysis_id2rc_name ) { # only add this message when scheduling and not during a Worker's specialization
push @log_buffer, "Submission capacity ($submit_capacity) has been reached.";
push @log_buffer, "Submission capacity (=".$submit_capacity_limiter->original_capacity.") has been reached.";
}
last;
}
......@@ -190,7 +190,7 @@ sub schedule_workers {
my $this_meadow_type = $analysis->meadow_type || $default_meadow_type;
if( $meadow_capacity_limiter_hashed_by_type && $meadow_capacity_limiter_hashed_by_type->{$this_meadow_type}->reached ) {
push @log_buffer, "Capacity of '$this_meadow_type' Meadow has been reached, skipping Analysis '$logic_name'.";
push @log_buffer, "Total capacity of '$this_meadow_type' Meadow (=".$meadow_capacity_limiter_hashed_by_type->{$this_meadow_type}->original_capacity.") has been reached, skipping Analysis '$logic_name'.";
next;
}
......
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