mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: remove workaround for cli parameters being turned into string
This commit is contained in:
committed by
Joachim Van Herwegen
parent
3f817b14b0
commit
a99db00fb2
@@ -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, +∞).');
|
||||
|
||||
Reference in New Issue
Block a user