An app for integrating Celery with Haystack
Project description
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
You also need to install your choice of one of the supported search engines for Haystack and one of the supported backends for Celery.
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.
Usage
Add 'celery_haystack' to the INSTALLED_APPS setting
INSTALLED_APPS = [ # .. 'celery_haystack', ]
Enable the celery-haystack signal processor in the settings
HAYSTACK_SIGNAL_PROCESSOR = 'celery_haystack.signals.CelerySignalProcessor'
Alter all of your SearchIndex subclasses to inherit from celery_haystack.indexes.CelerySearchIndex and haystack.indexes.Indexable
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
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.
Issues
Please use the EduGit issue tracker for any bug reports or feature requests.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file celery-haystack-ng-2.0.1.tar.gz
.
File metadata
- Download URL: celery-haystack-ng-2.0.1.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4c8b25bd14503f04874b77776cc7accf480ca5ba2f5a27473f7dac9a4dfb016 |
|
MD5 | 3fd3fba25e552359c2ec86e427c907a9 |
|
BLAKE2b-256 | d02e8a1004dbcea09d4e24063a1cb2c6c4ba531f9b1be21c2735452a9cc7b7f3 |
File details
Details for the file celery_haystack_ng-2.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: celery_haystack_ng-2.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c79bb224d85aad7c71072210a86bff6f7b502ad990c9f6695b117614477c34b |
|
MD5 | 0de3ed8defe15779a165fa244cd0b535 |
|
BLAKE2b-256 | d846630c652a24641437a13fc3eb7ee94a4a5922c3917140334bb845d03b111e |