diff --git a/lib/Command/Classify.php b/lib/Command/Classify.php index 5ee62625..5e407bfe 100644 --- a/lib/Command/Classify.php +++ b/lib/Command/Classify.php @@ -110,8 +110,19 @@ protected function execute(InputInterface $input, OutputInterface $output): int ]; foreach ($this->storageService->getFilesInMount($mount['storage_id'], $mount['override_root'], $models, $lastFileId) as $file) { $i++; - // if retry flag is set, skip tagged files $lastFileId = $file['fileid']; + $queueFile = new QueueFile(); + $queueFile->setStorageId($mount['storage_id']); + $queueFile->setRootId($mount['root_id']); + $queueFile->setFileId($file['fileid']); + $queueFile->setUpdate(false); + + if ($file['image']) { + if (in_array(ClusteringFaceClassifier::MODEL_NAME, $models)) { + $queues[ClusteringFaceClassifier::MODEL_NAME][] = $queueFile; + } + } + // if retry flag is set, skip other classifiers for tagged files if ($input->getOption('retry')) { $fileTags = $this->tagManager->getTagsForFiles([$lastFileId]); // check if processed tag is already in the tags @@ -119,19 +130,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int continue; } } - $queueFile = new QueueFile(); - $queueFile->setStorageId($mount['storage_id']); - $queueFile->setRootId($mount['root_id']); - $queueFile->setFileId($file['fileid']); - $queueFile->setUpdate(false); - if ($file['image']) { if (in_array(ImagenetClassifier::MODEL_NAME, $models)) { $queues[ImagenetClassifier::MODEL_NAME][] = $queueFile; } - if (in_array(ClusteringFaceClassifier::MODEL_NAME, $models)) { - $queues[ClusteringFaceClassifier::MODEL_NAME][] = $queueFile; - } } if ($file['video']) { if (in_array(MovinetClassifier::MODEL_NAME, $models)) {