CKAN Datastorer Extension
The CKAN Datastorer Extension provides a Celery task for automatically saving CKAN resources that link to CSV and Excel files into the DataStore.
Note: This extension is deprecated and has been superseded by DataPusher. For new installations, use DataPusher instead.
Installation without Celery
After activating your pyenv, install the sources via pip:
(pyenv) pip install -e git+git://github.com/ckan/ckanext-datastorer.git#egg=ckanext-datastorer
(pyenv) pip install -r ckanext-datastorer/pip-requirements.txt
Paster Command
A paster command is available that lets you archive all resources or just those belonging to a specific package without celery:
paster datastore_upload [package-id] -i/--ignore [package-id] --no-hash
It is recommended to run this command in a cron every hour:
@hourly /usr/lib/ckan/default/bin/paster --plugin=ckanext_datastorer datastore_upload -c /etc/ckan/default/production.ini &> /tmp/update_datastore
Installation with Celery
(pyenv) pip install -e git+git://github.com/ckan/ckanext-datastorer.git#egg=ckanext-datastorer
(pyenv) pip install -r ckanext-datastorer/pip-requirements.txt
Add the datastorer plugin to your configuration ini file:
ckan.plugins = datastorer <rest of plugins>...
Start the celery daemon:
paster celeryd
In production, install supervisor and use a supervisor config.
Logging and Debugging
Add a logger for ckanext_datastorer in the CKAN config file:
[logger_ckanext_datastorer]
level = DEBUG
handlers = console
qualname = ckanext_datastorer
propagate = 0