optimize first system installation and fix migrations

This commit is contained in:
team2
2026-02-12 18:56:15 +01:00
parent 994f582f35
commit 14d7f3b2b9
4 changed files with 5 additions and 36 deletions

2
.gitignore vendored
View File

@@ -1,7 +1,7 @@
.ddev .ddev
.idea .idea
/var/knowledge /var/knowledge
/src/Vector/.venv /.venv
/src/Vector/vector.index /src/Vector/vector.index
/src/Vector/vector_meta.json /src/Vector/vector_meta.json
/var/locks /var/locks

View File

@@ -9,7 +9,7 @@ parameters:
mto.index.embedding_dimension: 768 mto.index.embedding_dimension: 768
mto.index.scoring_version: 1 mto.index.scoring_version: 1
mto.vector.python_bin: '/var/www/html/src/Vector/.venv/bin/python' mto.vector.python_bin: '/var/www/html/.venv/bin/python3'
mto.vector.ingest_script: '/src/Vector/vector_ingest.py' mto.vector.ingest_script: '/src/Vector/vector_ingest.py'
mto.vector.timeout: 600 mto.vector.timeout: 600

View File

@@ -1,33 +0,0 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20260211145121 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE ingest_job (id BINARY(16) NOT NULL, type VARCHAR(30) NOT NULL, status VARCHAR(20) NOT NULL, document_id VARCHAR(255) DEFAULT NULL, document_version_id VARCHAR(255) DEFAULT NULL, started_at DATETIME NOT NULL, finished_at DATETIME DEFAULT NULL, log_path VARCHAR(255) DEFAULT NULL, error_message LONGTEXT DEFAULT NULL, started_by_id BINARY(16) DEFAULT NULL, INDEX IDX_4F6AC8649740C9D5 (started_by_id), PRIMARY KEY (id)) DEFAULT CHARACTER SET utf8mb4');
$this->addSql('ALTER TABLE ingest_job ADD CONSTRAINT FK_4F6AC8649740C9D5 FOREIGN KEY (started_by_id) REFERENCES user (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE ingest_job DROP FOREIGN KEY FK_4F6AC8649740C9D5');
$this->addSql('DROP TABLE ingest_job');
}
}

View File

@@ -20,6 +20,7 @@ final class IngestOrchestrator
/** /**
* Startet Ingest für eine bestimmte DocumentVersion (1 Job pro Run). * Startet Ingest für eine bestimmte DocumentVersion (1 Job pro Run).
* @throws \Throwable
*/ */
public function runForVersion( public function runForVersion(
DocumentVersion $version, DocumentVersion $version,
@@ -58,7 +59,7 @@ final class IngestOrchestrator
usleep(200000); usleep(200000);
} else { } else {
// Fachlogik ausführen (Flow erzeugt keine Jobs!) // Fachlogik ausführen (Flow erzeugt keine Jobs!)
$this->ingestFlow->ingestDocumentVersion($version, $job->getLogPath()); $this->ingestFlow->ingestDocumentVersion($version);
} }
// Erfolg // Erfolg
@@ -69,6 +70,7 @@ final class IngestOrchestrator
return $job; return $job;
} catch (\Throwable $e) { } catch (\Throwable $e) {
if ($job) { if ($job) {
$this->jobService->markFailed($job, $e->getMessage()); $this->jobService->markFailed($job, $e->getMessage());
} }