Generate info dir
Scans the RDF directory structure and populates Redis with the correct counter values based on existing entities.
uv run python -m oc_meta.run.infodir.gen <directory> [options]Parameters
Section titled “Parameters”| Parameter | Required | Default | Description |
|---|---|---|---|
directory | Yes | - | Path to the RDF directory (containing br/, ra/, etc.) |
--redis-host | No | localhost | Redis server host |
--redis-port | No | 6379 | Redis server port |
--redis-db | No | 6 | Redis database number |
Process
Section titled “Process”- For each entity type (
br,ra,ar,re,id), the script finds the highest numbered entity in each supplier prefix folder - Sets the main counter for each entity type and prefix
- Scans all provenance files in parallel to find the highest snapshot number for each entity
- Updates the provenance counters in batch
Example
Section titled “Example”uv run python -m oc_meta.run.infodir.gen /srv/oc_meta/rdf \ --redis-host localhost \ --redis-port 6379 \ --redis-db 5This reads all RDF files under /srv/oc_meta/rdf and populates Redis database 5 with the counter values.