Protokoll #29276

ID29276
Zeitstempel2025-12-29 08:50:14.723087
Clientroot
IP145.224.72.140
Modellclaude-sonnet-4-20250514
Statuspending
Tokens360 (Input: 360, Output: 0)
Dauer-
Request-Zeit2025-12-29 08:50:14.723087
Response-Zeit-

Request

{
    "event": "PreToolUse",
    "tool_name": "Write",
    "tool_input": {
        "file_path": "\/var\/www\/dev.campus.systemische-tools.de\/bin\/cleanup-stale-protokoll.php",
        "content": "#!\/usr\/bin\/env php\n<?php\n\ndeclare(strict_types=1);\n\n\/\/ @responsibility: Cron-Job zum Aufräumen verwaister pending-Protokoll-Einträge\n\n\/**\n * Cleanup stale pending protokoll entries.\n *\n * Run via cron every 5 minutes:\n * *\/5 * * * * \/usr\/bin\/php \/var\/www\/dev.campus.systemische-tools.de\/bin\/cleanup-stale-protokoll.php\n *\/\n\nrequire __DIR__ . '\/..\/vendor\/autoload.php';\n\nuse Infrastructure\\Logging\\KiProtokollService;\nuse Infrastructure\\Persistence\\KiProtokollRepository;\n\n\/\/ Get PDO connection (ki_dev)\n$credentials = json_decode(file_get_contents('\/etc\/mcp-db\/credentials.json'), true);\n$dsn = sprintf(\n    'mysql:host=%s;port=%d;dbname=ki_dev;charset=utf8mb4',\n    $credentials['host'],\n    $credentials['port'] ?? 3306\n);\n$pdo = new PDO($dsn, $credentials['user'], $credentials['password'], [\n    PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n    PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\n]);\n\n$repository = new KiProtokollRepository($pdo);\n$service = new KiProtokollService($repository);\n\n$minutesOld = (int) ($argv[1] ?? 10);\n$affected = $service->cleanupStale($minutesOld);\n\nif ($affected > 0) {\n    echo date('Y-m-d H:i:s') . \" - Cleaned up {$affected} stale protokoll entries (older than {$minutesOld} min)\\n\";\n}\n"
    }
}

Response

-
← Vorheriger Zur Liste Nächster →