Skip to content

Commit 1bd5c55

Browse files
committed
fix(Classifier): Check cores against int value
fixes #1370 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 parent 9330c7f commit 1bd5c55

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Classifiers/Classifier.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ public function classifyFiles(string $model, array $queueFiles, int $timeout): \
194194
try {
195195
$proc->start();
196196

197-
if ($cores !== '0') {
197+
if ((int)$cores !== 0) {
198+
$this->logger->warning('taskset -cp ' . implode(',', range(0, (int)$cores, 1)) . ' ' . ((string)$proc->getPid()));
198199
@exec('taskset -cp ' . implode(',', range(0, (int)$cores, 1)) . ' ' . ((string)$proc->getPid()));
199200
}
200201

0 commit comments

Comments
 (0)