Protokoll #10616

ID10616
Zeitstempel2025-12-23 15:36:06.062536
Clientroot
IP
Warning: Undefined array key "request_ip" in /var/www/dev.campus.systemische-tools.de/src/View/protokoll/show.php on line 13

Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/dev.campus.systemische-tools.de/src/View/protokoll/show.php on line 13
Modellclaude-sonnet-4-20250514
Statuscompleted
Tokens899 (Input: 0, Output: 0)
Dauer130 ms
Request-Zeit
Warning: Undefined array key "request_timestamp" in /var/www/dev.campus.systemische-tools.de/src/View/protokoll/show.php on line 18
Response-Zeit-

Warning: Undefined array key "error_message" in /var/www/dev.campus.systemische-tools.de/src/View/protokoll/show.php on line 22

Request

{
    "event": "PreToolUse",
    "tool_name": "Read",
    "tool_input": {
        "file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/UseCases\/Pipeline\/RunPipelineUseCase.php"
    }
}

Response

{
    "tool_response": {
        "type": "text",
        "file": {
            "filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/UseCases\/Pipeline\/RunPipelineUseCase.php",
            "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace UseCases\\Pipeline;\n\n\/\/ @responsibility: Startet und verwaltet Pipeline-Ausführungen\n\nuse Domain\\Repository\\PipelineRepositoryInterface;\n\nclass RunPipelineUseCase\n{\n    private const PYTHON_BIN = '\/opt\/scripts\/pipeline\/venv\/bin\/python';\n    private const PIPELINE_SCRIPT = '\/opt\/scripts\/pipeline\/pipeline.py';\n    private const LOG_DIR = '\/tmp';\n\n    public function __construct(\n        private PipelineRepositoryInterface $repository\n    ) {\n    }\n\n    \/**\n     * Start a new pipeline run.\n     *\n     * @param int $pipelineId Pipeline ID\n     * @return array{success: bool, run_id?: int, error?: string}\n     *\/\n    public function start(int $pipelineId): array\n    {\n        $pipeline = $this->repository->findById($pipelineId);\n\n        if ($pipeline === null) {\n            return ['success' => false, 'error' => 'Pipeline nicht gefunden'];\n        }\n\n        $runId = $this->repository->createRun($pipelineId);\n\n        $this->executeInBackground($pipelineId, $runId);\n\n        return ['success' => true, 'run_id' => $runId];\n    }\n\n    \/**\n     * Cancel a running pipeline.\n     *\n     * @param int $pipelineId Pipeline ID\n     * @param int $runId Run ID\n     * @return array{success: bool, error?: string}\n     *\/\n    public function cancel(int $pipelineId, int $runId): array\n    {\n        $run = $this->repository->findRunById($runId);\n\n        if ($run === null || (int) $run['pipeline_id'] !== $pipelineId) {\n            return ['success' => false, 'error' => 'Run nicht gefunden'];\n        }\n\n        if ($run['status'] !== 'running') {\n            return [\n                'success' => false,\n                'error' => 'Run kann nicht abgebrochen werden (Status: ' . $run['status'] . ')',\n            ];\n        }\n\n        $this->repository->updateRun($runId, [\n            'status' => 'cancelled',\n            'completed_at' => date('Y-m-d H:i:s'),\n        ]);\n\n        return ['success' => true];\n    }\n\n    \/**\n     * Get simple status for a pipeline (latest run).\n     *\n     * @param int $pipelineId Pipeline ID\n     * @return array{success: bool, error?: string, run?: array}\n     *\/\n    public function getStatus(int $pipelineId): array\n    {\n        $pipeline = $this->repository->findById($pipelineId);\n\n        if ($pipeline === null) {\n            return ['success' => false, 'error' => 'Pipeline nicht gefunden'];\n        }\n\n        return [\n            'success' => true,\n            'pipeline_id' => $pipelineId,\n            'run' => $this->repository->findLatestRun($pipelineId),\n        ];\n    }\n\n    \/**\n     * Execute pipeline script in background.\n     *\/\n    private function executeInBackground(int $pipelineId, int $runId): void\n    {\n        $logFile = sprintf('%s\/pipeline_run_%d.log', self::LOG_DIR, $runId);\n\n        $cmd = sprintf(\n            'nohup %s %s all --pipeline-id=%d --run-id=%d > %s 2>&1 &',\n            escapeshellarg(self::PYTHON_BIN),\n            escapeshellarg(self::PIPELINE_SCRIPT),\n            $pipelineId,\n            $runId,\n            escapeshellarg($logFile)\n        );\n\n        exec($cmd);\n    }\n}\n",
            "numLines": 113,
            "startLine": 1,
            "totalLines": 113
        }
    }
}
← Vorheriger Zur Liste Nächster →