Debian Codegraph @

PKG-INFO

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