Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require": {
"php": ">=8.2",
"php": ">=8.3",
"ext-json": "*",
"ext-pdo": "*",
"rubix/ml": "2.x",
Expand Down
3 changes: 2 additions & 1 deletion lib/BackgroundJobs/ClassifierJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
declare(strict_types=1);
namespace OCA\Recognize\BackgroundJobs;

use OCA\Recognize\Classifiers\AbstractTaskProcessingClassifier;
use OCA\Recognize\Db\QueueFile;
use OCA\Recognize\Service\QueueService;
use OCA\Recognize\Service\SettingsService;
Expand Down Expand Up @@ -56,7 +57,7 @@ protected function runClassifier(string $model, array $argument): void {
return;
}
$this->logger->debug('Classifying files of storage '.$storageId. ' using '.$model);
$batchSize = $taskProcessingMode ? 500 : $this->getBatchSize();
$batchSize = $taskProcessingMode ? AbstractTaskProcessingClassifier::BATCH_SIZE : $this->getBatchSize();
try {
$this->logger->debug('fetching '.$batchSize.' files from '.$model.' queue');
$files = $this->queue->getFromQueue($model, $storageId, $rootId, $batchSize);
Expand Down
2 changes: 2 additions & 0 deletions lib/Classifiers/AbstractTaskProcessingClassifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
use Psr\Log\LoggerInterface;

abstract class AbstractTaskProcessingClassifier {
public const int BATCH_SIZE = 256;

public function __construct(
protected LoggerInterface $logger,
protected ITaskProcessingManager $taskProcessingManager,
Expand Down
Loading