Convert-Pheno
view release on metacpan or search on metacpan
lib/Convert/Pheno/HTTP/Jobs.pm view on Meta::CPAN
unlink "$dir/request.json";
}
return $self;
}
sub settings {
my ($self) = @_;
return {maxConcurrentJobs => $self->{max_concurrent_jobs}, maxAllowedConcurrentJobs => $self->{max_allowed_jobs}};
}
sub update_settings {
my ($self, $settings) = @_;
die "The job service has stopped\n" if $self->{stopped};
die "Provide only maxConcurrentJobs\n" unless ref($settings) eq 'HASH'
&& keys(%$settings) == 1 && exists $settings->{maxConcurrentJobs};
my $limit = _validate_job_limit($settings->{maxConcurrentJobs}, $self->{max_allowed_jobs});
_write(path($self->{root}, 'scheduler-settings.json'), {maxConcurrentJobs => $limit});
$self->{max_concurrent_jobs} = $limit;
$self->_next;
return $self->settings;
}
( run in 2.789 seconds using v1.01-cache-2.11-cpan-145b269f2f3 )