RNNLIVYYCD6HQTY6WSKOYJ6FTWY7SFLZAZ42IEQM3JFWP3GOYQMQC
my $extraAllowed = $maxConcurrent{$system} - $nrActive;
(my $systemTypeInfo) = $db->resultset('SystemTypes')->search({system => $system->system});
my $max = defined $systemTypeInfo ? $systemTypeInfo->maxconcurrent : $maxConcurrent{$system} // 2;
my $extraAllowed = $max - $nrActive;