.. You should enable this project on travis-ci.org and coveralls.io to make
these badges work. The necessary Travis and Coverage config files have been
generated for you.
.. .. image:: https://travis-ci.org/ckan/ckanext-rq.svg?branch=master
.. :target: https://travis-ci.org/ckan/ckanext-rq
.. .. image:: https://coveralls.io/repos/ckan/ckanext-rq/badge.svg
.. :target: https://coveralls.io/r/ckan/ckanext-rq
.. image:: https://img.shields.io/pypi/v/ckanext-rq.svg
:target: https://pypi.python.org/pypi/ckanext-rq/
:alt: Latest Version
.. image:: https://img.shields.io/pypi/pyversions/ckanext-rq.svg
:target: https://pypi.python.org/pypi/ckanext-rq/
:alt: Supported Python versions
.. image:: https://img.shields.io/pypi/status/ckanext-rq.svg
:target: https://pypi.python.org/pypi/ckanext-rq/
:alt: Development Status
.. image:: https://img.shields.io/pypi/l/ckanext-rq.svg
:target: https://pypi.python.org/pypi/ckanext-rq/
:alt: License
=============
ckanext-rq
Background jobs functionality for CKAN 2.6 and earlier.
This is a backport of the background jobs functionality (based on RQ) that was introduced in CKAN 2.7. With this extension, you can make use of RQ based background tasks, on earlier versions of CKAN.
It is based on the code by @torfsen, mainly here: https://github.com/ckan/ckan/pull/3165
TODO:
- check Redis is available on startup
- setting ckan.redis.url from environment variable CKAN_REDIS_URL
Note
You won’t be able to use the normal plugin.toolkit.enqueue_job function. Use
this import which contains a fallback::
try:
enqueue_job = p.toolkit.enqueue_job
except AttributeError:
from ckanext.rq.jobs import enqueue as enqueue_job
Requirements
For CKAN versions 2.3 to 2.6.x. (Must not be used with CKAN 2.7.0 or later)
Installation
You need Redis installed::
sudo apt-get install redis-server
To install c