mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 23:14:03 +00:00
minor improvements to parallelization logic
This commit is contained in:
parent
075789eb91
commit
303b52d25a
1 changed files with 2 additions and 2 deletions
|
|
@ -68,7 +68,7 @@ trait ParallelCommand
|
||||||
}
|
}
|
||||||
|
|
||||||
// This should return the total number of logical cores on any BSD-based system
|
// This should return the total number of logical cores on any BSD-based system
|
||||||
if ($ffi->sysctlbyname('hw.ncpu', FFI::addr($cores), FFI::addr($size), null, 0) == -1) {
|
if ($ffi->sysctlbyname('hw.ncpu', FFI::addr($cores), FFI::addr($size), null, 0) !== 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -104,7 +104,7 @@ trait ParallelCommand
|
||||||
$processes = (int) $processes;
|
$processes = (int) $processes;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($processes < 0) { // can come from sysctlGetLogicalCoreCount()
|
if ($processes < 1) {
|
||||||
$this->components->error('Minimum value for processes is 1. Try specifying -p manually.');
|
$this->components->error('Minimum value for processes is 1. Try specifying -p manually.');
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue