Reference¶
API¶
To view the API’s documentation in development, run the server and open http://127.0.0.1:8000/api/schema/swagger-ui/ or http://127.0.0.1:8000/api/schema/redoc/.
The API is used for managing collections (see Kingfisher Collect and KINGFISHER_PROCESS_URL
in the Data Registry).
Environment variables¶
See OCP’s approach to Django settings. New variables are:
- LOG_LEVEL
The log level of the root logger
- RABBIT_URL
The connection string for RabbitMQ
- RABBIT_EXCHANGE_NAME
The name of the RabbitMQ exchange. Follow the pattern
kingfisher_process_{service}_{environment}
likekingfisher_process_data_registry_production
- SCRAPYD_URL
The base URL of Scrapyd, for example:
http://localhost:6800
- SCRAPYD_PROJECT
The project within Scrapyd
- KINGFISHER_COLLECT_FILES_STORE
The directory from which to read the files written by Kingfisher Collect. If Kingfisher Collect and Kingfisher Process share a filesystem, this will be the same value for both services.
- ENABLE_CHECKER
Whether to enable the
checker
worker
It is recommended to set REQUESTS_POOL_MAXSIZE
to 20
, to set the maximum number of connections to save in the connection pool used by the ocdsextensionregistry package. This is the same value as the prefetch_count used by RabbitMQ consumers.
Message routing¶
See also
In each worker and command, the queue name and the routing key of published messages (with one exception) is set by a routing_key
variable. The binding keys are set by a consume_routing_keys
variable. Queue names and routing keys are prefixed by the exchange name, set by the RABBIT_EXCHANGE_NAME
environment variable.
Actor |
Consumer routing keys (input) |
Publisher routing keys (output) |
Processing step |
---|---|---|---|
|
N/A |
|
Create |
|
N/A |
|
Create |
|
N/A |
|
Create |
|
N/A |
|
N/A |
|
N/A |
|
N/A |
|
N/A |
|
N/A |
|
|
|
Create |
|
|
|
|
|
|
|
Delete |
|
|
|
|
|
|
|
Delete |
|
|
|
Delete |
|
|
N/A |
Do nothing if a step remains |
|
|
N/A |
N/A |