Command-line interface¶
./manage.py --help
Commands¶
load¶
Load data into a collection, asynchronously.
./manage.py load [OPTIONS] PATH [PATH ...]
- -s SOURCE, --source SOURCE
the source from which the files were retrieved (append ‘_local’ if not sourced from Scrapy)
- -t TIME, --time TIME
the time at which the files were retrieved in ‘YYYY-MM-DD HH:MM:SS’ format (defaults to the earliest file modification time)
- --sample
whether the files represent a sample from the source
- -n NOTE, --note NOTE
a note to add to the collection
- -f, --force
use the provided –source value, regardless of whether it is recognized
- -u, --upgrade
upgrade the collection to the latest OCDS version
- -c, --compile
create compiled releases from the collection
- -e, --check
run structural checks on the collection
- -k, --keep-open
keep collection open for future file additions
Note
If the files are arrays of packages, only the first package’s metadata is saved. In other words, it is assumed that all packages have the same metadata.
addfiles¶
Load data into an open root collection, asynchronously.
./manage.py addfiles collection_id path [path ...]
closecollection¶
Close an open root collection and its derived collections, if any.
./manage.py closecollection collection_id
addchecks¶
Add processing steps to check data, if unchecked.
./manage.py addchecks collection_id
deletecollection¶
Delete a collection and its ancestors.
Rows in the package_data
and data
tables are not deleted. Use deleteorphan instead.
./manage.py deletecollection collection_id
collectionstatus¶
Get the status of a root collection and its children.
./manage.py collectionstatus collection_id
deleteorphan¶
Delete rows from the data and package_data tables that relate to no collections.
./manage.py deleteorphan
Workers¶
Note
Consumers declare and bind queues, not publishers.
Start each worker before publishing messages (for example, with the load command).
Tip
Set the LOG_LEVEL
environment variable to DEBUG
to see log messages about message processing. For example:
env LOG_LEVEL=DEBUG ./manage.py finisher
api_loader¶
Create collection files.
Consumes messages published by other software, like Kingfisher Collect.
./manage.py api_loader
file_worker¶
Create records, releases and compiled releases.
./manage.py file_worker
checker¶
Check collection files.
Performs no work if the collection’s steps
field excludes “check”.
Errors if the ENABLE_CHECKER
environment variable is not set.
./manage.py checker
compiler¶
Start compilation and route messages to the record or release compilers.
Performs no work if the collection’s steps
field excludes “compile”.
For a collection of release packages, starts compilation at most once if all collection files are loaded and the collection is closed.
./manage.py compiler
record_compiler¶
Create compiled releases from records.
./manage.py record_compiler
release_compiler¶
Create compiled releases from releases with the same OCID.
./manage.py release_compiler
finisher¶
Set collections as completed, close compiled collections and cache row counts.
./manage.py finisher
wiper¶
Delete collections and their ancestors.
Rows in the package_data
and data
tables are not deleted.
./manage.py wiper