1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
|
Metadata-Version: 2.1
Name: celery-haystack-ng
Version: 2.0.1
Summary: An app for integrating Celery with Haystack
Home-page: http://celery-haystack-ng.rtfd.org/
Author: Dominik George
Author-email: dominik.george@teckids.org
Project-URL: Code, https://edugit.org/AlekSIS/libs/celery-haystack-ng
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Utilities
License-File: LICENSE
License-File: AUTHORS
Requires-Dist: django-appconf>=0.4.1
Requires-Dist: django-haystack>=2.0
Requires-Dist: celery>=4.0
==================
celery-haystack-ng
==================
This Django app allows you to utilize Celery for automatically updating and
deleting objects in a Haystack_ search index.
Forked from the original celery-haystack_.
Requirements
------------
* Django 2.1+
* Haystack_ 2.X+
* Celery_ 4.X+
You also need to install your choice of one of the supported search engines
for Haystack and one of the supported backends for Celery.
.. _Haystack: http://haystacksearch.org
.. _celery-haystack: https://github.com/django-haystack/celery-haystack
Installation
------------
Use your favorite Python package manager to install the app from PyPI, e.g.::
pip install celery-haystack-ng
For Django < 1.9 you need to install and configure `django-transaction-hooks`_ -- an app that
brings transaction commit hooks to Django.
.. _django-transaction-hooks: https://github.com/carljm/django-transaction-hooks
Usage
-----
1. Add ``'celery_haystack'`` to the ``INSTALLED_APPS`` setting
.. code:: python
INSTALLED_APPS = [
# ..
'celery_haystack',
]
2. Enable the celery-haystack signal processor in the settings
.. code:: python
HAYSTACK_SIGNAL_PROCESSOR = 'celery_haystack.signals.CelerySignalProcessor'
3. Alter all of your ``SearchIndex`` subclasses to inherit from
``celery_haystack.indexes.CelerySearchIndex`` and
``haystack.indexes.Indexable``
.. code:: python
from haystack import indexes
from celery_haystack.indexes import CelerySearchIndex
from myapp.models import Note
class NoteIndex(CelerySearchIndex, indexes.Indexable):
text = indexes.CharField(document=True, model_attr='content')
def get_model(self):
return Note
4. Ensure your Celery instance is running.
Thanks
------
This app is a blatant rip-off of Daniel Lindsley's queued_search_
app but uses Ask Solem Hoel's Celery_ instead of the equally awesome
queues_ library by Matt Croyden.
.. _queued_search: https://github.com/toastdriven/queued_search/
.. _Celery: http://celeryproject.org/
.. _queues: http://code.google.com/p/queues/
Issues
------
Please use the `EduGit issue tracker`_ for any bug reports or feature
requests.
.. _`EduGit issue tracker`: https://edugit.org/AlekSIS/libs/celery-haystack-ng/-/issues
|