{
"event": "PostToolUse",
"tool_name": "Read",
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/Docs\/ChunkSyncService.php",
"content": " return $success;\n }\n\n \/**\n * Syncs all analyzed chunks that haven't been synced yet.\n *\n * @return array{synced: int, failed: int, errors: array<string>}\n *\/\n public function syncAllPending(int $limit = Constants::DEFAULT_LIMIT): array\n {\n $this->ensureCollection();\n\n $results = ['synced' => 0, 'failed' => 0, 'errors' => []];\n $chunks = $this->getUnsyncedChunks($limit);\n\n foreach ($chunks as $chunk) {\n try {\n if ($this->syncChunk((int) $chunk['id'])) {\n $results['synced']++;\n\n if ($results['synced'] % self::BATCH_SIZE === 0) {\n echo \"Synced {$results['synced']} chunks...\\n\";\n }\n } else {\n $results['failed']++;\n $results['errors'][] = \"Chunk #{$chunk['id']}: Sync failed\";\n }\n } catch (\\RuntimeException $e) {\n $results['failed']++;\n $results['errors'][] = \"Chunk #{$chunk['id']}: \" . $e->getMessage();",
"numLines": 30,
"startLine": 65,
"totalLines": 303
}
}
}