fix: remove workaround for cli parameters being turned into string

This commit is contained in:
Thomas Dupont
2022-06-01 10:43:37 +02:00
committed by Joachim Van Herwegen
parent 3f817b14b0
commit a99db00fb2
2 changed files with 10 additions and 14 deletions

View File

@@ -49,12 +49,8 @@ export class ClusterManager {
private readonly workers: number;
private readonly clusterMode: ClusterMode;
public constructor(workers: number | string) {
public constructor(workers: number) {
const cores = cpus().length;
// Workaround for https://github.com/CommunitySolidServer/CommunitySolidServer/issues/1182
if (typeof workers === 'string') {
workers = Number.parseInt(workers, 10);
}
if (workers <= -cores) {
throw new InternalServerError('Invalid workers value (should be in the interval ]-num_cores, +∞).');