diff -Nru celery-haystack-0.9/celery_haystack/conf.py celery-haystack-0.10/celery_haystack/conf.py --- celery-haystack-0.9/celery_haystack/conf.py 2015-06-13 14:40:27.000000000 +0000 +++ celery-haystack-0.10/celery_haystack/conf.py 2015-12-30 16:50:04.000000000 +0000 @@ -1,6 +1,6 @@ from django.conf import settings # noqa from django.core.exceptions import ImproperlyConfigured -from haystack import constants, __version__ as haystack_version +from haystack import constants from haystack.management.commands import update_index as cmd from appconf import AppConf @@ -56,7 +56,7 @@ signal_processor = getattr(settings, 'HAYSTACK_SIGNAL_PROCESSOR', None) -if haystack_version[0] >= 2 and signal_processor is None: +if signal_processor is None: raise ImproperlyConfigured("When using celery-haystack with Haystack 2.X " "the HAYSTACK_SIGNAL_PROCESSOR setting must be " "set. Use 'celery_haystack.signals." diff -Nru celery-haystack-0.9/celery_haystack/indexes.py celery-haystack-0.10/celery_haystack/indexes.py --- celery-haystack-0.9/celery_haystack/indexes.py 2015-06-13 14:40:27.000000000 +0000 +++ celery-haystack-0.10/celery_haystack/indexes.py 2015-12-30 16:36:15.000000000 +0000 @@ -1,53 +1,5 @@ -from django.db.models import signals - from haystack import indexes -from .utils import enqueue_task - class CelerySearchIndex(indexes.SearchIndex): - """ - A ``SearchIndex`` subclass that enqueues updates/deletes for later - processing using Celery. - """ - # We override the built-in _setup_* methods to connect the enqueuing - # operation. - def _setup_save(self, model): - signals.post_save.connect(self.enqueue_save, - sender=model, - dispatch_uid=CelerySearchIndex) - - def _setup_delete(self, model): - signals.post_delete.connect(self.enqueue_delete, - sender=model, - dispatch_uid=CelerySearchIndex) - - def _teardown_save(self, model): - signals.post_save.disconnect(self.enqueue_save, - sender=model, - dispatch_uid=CelerySearchIndex) - - def _teardown_delete(self, model): - signals.post_delete.disconnect(self.enqueue_delete, - sender=model, - dispatch_uid=CelerySearchIndex) - - def enqueue_save(self, instance, **kwargs): - if not getattr(instance, 'skip_indexing', False): - return self.enqueue('update', instance) - - def enqueue_delete(self, instance, **kwargs): - if not getattr(instance, 'skip_indexing', False): - return self.enqueue('delete', instance) - - def enqueue(self, action, instance): - """ - Shoves a message about how to update the index into the queue. - - This is a standardized string, resembling something like:: - - ``notes.note.23`` - # ...or... - ``weblog.entry.8`` - """ - return enqueue_task(action, instance) + pass diff -Nru celery-haystack-0.9/celery_haystack/__init__.py celery-haystack-0.10/celery_haystack/__init__.py --- celery-haystack-0.9/celery_haystack/__init__.py 2015-06-13 14:40:27.000000000 +0000 +++ celery-haystack-0.10/celery_haystack/__init__.py 2015-12-30 17:15:35.000000000 +0000 @@ -1,4 +1,4 @@ -__version__ = '0.9' +__version__ = '0.10' def version_hook(config): diff -Nru celery-haystack-0.9/celery_haystack/tasks.py celery-haystack-0.10/celery_haystack/tasks.py --- celery-haystack-0.9/celery_haystack/tasks.py 2015-06-13 14:40:27.000000000 +0000 +++ celery-haystack-0.10/celery_haystack/tasks.py 2015-12-30 16:37:54.000000000 +0000 @@ -1,26 +1,14 @@ from django.core.exceptions import ImproperlyConfigured from django.core.management import call_command -from django.db.models.loading import get_model +from django.apps import apps +get_model = apps.get_model from .conf import settings -try: - from haystack import connections, connection_router - from haystack.exceptions import NotHandled as IndexNotFoundException - legacy = False -except ImportError: - try: - from haystack import site - from haystack.exceptions import NotRegistered as IndexNotFoundException # noqa - legacy = True - except ImportError as e: - raise ImproperlyConfigured("Haystack couldn't be imported: %s" % e) - -if settings.CELERY_HAYSTACK_TRANSACTION_SAFE and not getattr(settings, 'CELERY_ALWAYS_EAGER', False): - from djcelery_transactions import PostTransactionTask as Task -else: - from celery.task import Task # noqa +from haystack import connections, connection_router +from haystack.exceptions import NotHandled as IndexNotFoundException +from celery.task import Task # noqa from celery.utils.log import get_task_logger logger = get_task_logger(__name__) @@ -83,14 +71,10 @@ Fetch the model's registered ``SearchIndex`` in a standarized way. """ try: - if legacy: - index_holder = site - yield index_holder.get_index(model_class), self.using - else: - using_backends = connection_router.for_write(**{'models': [model_class]}) - for using in using_backends: - index_holder = connections[using].get_unified_index() - yield index_holder.get_index(model_class), using + using_backends = connection_router.for_write(**{'models': [model_class]}) + for using in using_backends: + index_holder = connections[using].get_unified_index() + yield index_holder.get_index(model_class), using except IndexNotFoundException: raise ImproperlyConfigured("Couldn't find a SearchIndex for %s." % model_class) diff -Nru celery-haystack-0.9/celery_haystack/tests/search_indexes.py celery-haystack-0.10/celery_haystack/tests/search_indexes.py --- celery-haystack-0.9/celery_haystack/tests/search_indexes.py 2015-06-13 14:40:27.000000000 +0000 +++ celery-haystack-0.10/celery_haystack/tests/search_indexes.py 2015-12-30 16:49:10.000000000 +0000 @@ -1,17 +1,8 @@ -from haystack import indexes, __version__ as haystack_version +from haystack import indexes from .models import Note from ..indexes import CelerySearchIndex -if haystack_version[:2] < (2, 0): - from haystack import site - - class Indexable(object): - pass - indexes.Indexable = Indexable -else: - site = None # noqa - # Simplest possible subclass that could work. class NoteIndex(CelerySearchIndex, indexes.Indexable): @@ -19,6 +10,3 @@ def get_model(self): return Note - -if site: - site.register(Note, NoteIndex) diff -Nru celery-haystack-0.9/celery_haystack/tests/tests.py celery-haystack-0.10/celery_haystack/tests/tests.py --- celery-haystack-0.9/celery_haystack/tests/tests.py 2015-06-13 14:40:27.000000000 +0000 +++ celery-haystack-0.10/celery_haystack/tests/tests.py 2015-12-30 16:26:49.000000000 +0000 @@ -1,12 +1,12 @@ from django.core.management import call_command -from django.test import TestCase +from django.test import TransactionTestCase from haystack.query import SearchQuerySet from .models import Note -class QueuedSearchIndexTestCase(TestCase): +class QueuedSearchIndexTestCase(TransactionTestCase): def assertSearchResultLength(self, count): self.assertEqual(count, len(SearchQuerySet())) diff -Nru celery-haystack-0.9/celery_haystack/test_settings.py celery-haystack-0.10/celery_haystack/test_settings.py --- celery-haystack-0.9/celery_haystack/test_settings.py 2015-06-13 14:40:27.000000000 +0000 +++ celery-haystack-0.10/celery_haystack/test_settings.py 2015-12-30 16:26:49.000000000 +0000 @@ -1,7 +1,5 @@ import os -import django - from celery import Celery app = Celery('celery_haystack') @@ -34,19 +32,10 @@ CELERYD_LOG_LEVEL = "DEBUG" CELERY_DEFAULT_QUEUE = "celery-haystack" -if django.VERSION < (1, 6): - TEST_RUNNER = 'discover_runner.DiscoverRunner' - -if os.environ.get('HAYSTACK') == 'v1': - HAYSTACK_SITECONF = 'celery_haystack.tests.search_sites' - HAYSTACK_SEARCH_ENGINE = 'whoosh' - HAYSTACK_WHOOSH_PATH = os.path.join(TEST_ROOT, 'whoosh_index') - -elif os.environ.get('HAYSTACK') == 'v2': - HAYSTACK_CONNECTIONS = { - 'default': { - 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', - 'PATH': os.path.join(TEST_ROOT, 'whoosh_index'), - } +HAYSTACK_CONNECTIONS = { + 'default': { + 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', + 'PATH': os.path.join(TEST_ROOT, 'whoosh_index'), } - HAYSTACK_SIGNAL_PROCESSOR = 'celery_haystack.signals.CelerySignalProcessor' +} +HAYSTACK_SIGNAL_PROCESSOR = 'celery_haystack.signals.CelerySignalProcessor' diff -Nru celery-haystack-0.9/celery_haystack/utils.py celery-haystack-0.10/celery_haystack/utils.py --- celery-haystack-0.9/celery_haystack/utils.py 2015-06-13 14:40:27.000000000 +0000 +++ celery-haystack-0.10/celery_haystack/utils.py 2015-12-30 17:15:15.000000000 +0000 @@ -1,6 +1,9 @@ from django.core.exceptions import ImproperlyConfigured -from django.utils.importlib import import_module -from django.db import connection +try: + from importlib import import_module +except ImportError: + from django.utils.importlib import import_module +from django.db import connection, transaction from haystack.utils import get_identifier @@ -23,21 +26,30 @@ return Task() -def enqueue_task(action, instance): +def enqueue_task(action, instance, **kwargs): """ Common utility for enqueing a task for the given action and model instance. """ identifier = get_identifier(instance) - kwargs = {} + options = {} if settings.CELERY_HAYSTACK_QUEUE: - kwargs['queue'] = settings.CELERY_HAYSTACK_QUEUE + options['queue'] = settings.CELERY_HAYSTACK_QUEUE if settings.CELERY_HAYSTACK_COUNTDOWN: - kwargs['countdown'] = settings.CELERY_HAYSTACK_COUNTDOWN + options['countdown'] = settings.CELERY_HAYSTACK_COUNTDOWN + task = get_update_task() - if hasattr(connection, 'on_commit'): + task_func = lambda: task.apply_async((action, identifier), kwargs, **options) + + if hasattr(transaction, 'on_commit'): + # Django 1.9 on_commit hook + transaction.on_commit( + task_func + ) + elif hasattr(connection, 'on_commit'): + # Django-transaction-hooks connection.on_commit( - lambda: task.apply_async((action, identifier), {}, **kwargs) + task_func ) else: - task.apply_async((action, identifier), {}, **kwargs) + task_func() diff -Nru celery-haystack-0.9/celery_haystack.egg-info/dependency_links.txt celery-haystack-0.10/celery_haystack.egg-info/dependency_links.txt --- celery-haystack-0.9/celery_haystack.egg-info/dependency_links.txt 1970-01-01 00:00:00.000000000 +0000 +++ celery-haystack-0.10/celery_haystack.egg-info/dependency_links.txt 2015-12-30 17:34:52.000000000 +0000 @@ -0,0 +1 @@ + diff -Nru celery-haystack-0.9/celery_haystack.egg-info/not-zip-safe celery-haystack-0.10/celery_haystack.egg-info/not-zip-safe --- celery-haystack-0.9/celery_haystack.egg-info/not-zip-safe 1970-01-01 00:00:00.000000000 +0000 +++ celery-haystack-0.10/celery_haystack.egg-info/not-zip-safe 2015-06-13 14:43:32.000000000 +0000 @@ -0,0 +1 @@ + diff -Nru celery-haystack-0.9/celery_haystack.egg-info/PKG-INFO celery-haystack-0.10/celery_haystack.egg-info/PKG-INFO --- celery-haystack-0.9/celery_haystack.egg-info/PKG-INFO 1970-01-01 00:00:00.000000000 +0000 +++ celery-haystack-0.10/celery_haystack.egg-info/PKG-INFO 2015-12-30 17:34:52.000000000 +0000 @@ -0,0 +1,117 @@ +Metadata-Version: 1.1 +Name: celery-haystack +Version: 0.10 +Summary: An app for integrating Celery with Haystack. +Home-page: http://celery-haystack.rtfd.org/ +Author: Jannis Leidel +Author-email: jannis@leidel.info +License: UNKNOWN +Description: =============== + celery-haystack + =============== + + .. image:: https://secure.travis-ci.org/django-haystack/celery-haystack.png?branch=develop + :alt: Build Status + :target: http://travis-ci.org/django-haystack/celery-haystack + + This Django app allows you to utilize Celery for automatically updating and + deleting objects in a Haystack_ search index. + + Requirements + ------------ + + * Django 1.8+ + * Haystack_ `2.X`_ + * Celery_ 3.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: http://www.celeryproject.org + + + Installation + ------------ + + Use your favorite Python package manager to install the app from PyPI, e.g.:: + + pip install celery-haystack + + + 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 `Github issue tracker`_ for any bug reports or feature + requests. + + .. _`Github issue tracker`: https://github.com/django-haystack/celery-haystack/issues + + +Platform: UNKNOWN +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 +Classifier: Programming Language :: Python :: 2.6 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3.3 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Topic :: Utilities diff -Nru celery-haystack-0.9/celery_haystack.egg-info/requires.txt celery-haystack-0.10/celery_haystack.egg-info/requires.txt --- celery-haystack-0.9/celery_haystack.egg-info/requires.txt 1970-01-01 00:00:00.000000000 +0000 +++ celery-haystack-0.10/celery_haystack.egg-info/requires.txt 2015-12-30 17:34:52.000000000 +0000 @@ -0,0 +1 @@ +django-appconf>=0.4.1 diff -Nru celery-haystack-0.9/celery_haystack.egg-info/SOURCES.txt celery-haystack-0.10/celery_haystack.egg-info/SOURCES.txt --- celery-haystack-0.9/celery_haystack.egg-info/SOURCES.txt 1970-01-01 00:00:00.000000000 +0000 +++ celery-haystack-0.10/celery_haystack.egg-info/SOURCES.txt 2015-12-30 17:34:52.000000000 +0000 @@ -0,0 +1,25 @@ +AUTHORS +LICENSE +MANIFEST.in +README.rst +setup.cfg +setup.py +celery_haystack/__init__.py +celery_haystack/conf.py +celery_haystack/indexes.py +celery_haystack/models.py +celery_haystack/signals.py +celery_haystack/tasks.py +celery_haystack/test_settings.py +celery_haystack/utils.py +celery_haystack.egg-info/PKG-INFO +celery_haystack.egg-info/SOURCES.txt +celery_haystack.egg-info/dependency_links.txt +celery_haystack.egg-info/not-zip-safe +celery_haystack.egg-info/requires.txt +celery_haystack.egg-info/top_level.txt +celery_haystack/tests/__init__.py +celery_haystack/tests/models.py +celery_haystack/tests/search_indexes.py +celery_haystack/tests/search_sites.py +celery_haystack/tests/tests.py \ No newline at end of file diff -Nru celery-haystack-0.9/celery_haystack.egg-info/top_level.txt celery-haystack-0.10/celery_haystack.egg-info/top_level.txt --- celery-haystack-0.9/celery_haystack.egg-info/top_level.txt 1970-01-01 00:00:00.000000000 +0000 +++ celery-haystack-0.10/celery_haystack.egg-info/top_level.txt 2015-12-30 17:34:52.000000000 +0000 @@ -0,0 +1 @@ +celery_haystack diff -Nru celery-haystack-0.9/debian/changelog celery-haystack-0.10/debian/changelog --- celery-haystack-0.9/debian/changelog 2015-08-11 11:15:46.000000000 +0000 +++ celery-haystack-0.10/debian/changelog 2016-01-02 12:55:11.000000000 +0000 @@ -1,3 +1,9 @@ +celery-haystack (0.10-1) unstable; urgency=medium + + * New upstream release (Closes: #806343). + + -- Michael Fladischer Sat, 02 Jan 2016 13:53:06 +0100 + celery-haystack (0.9-1) unstable; urgency=low * Initial release (Closes: #795168). diff -Nru celery-haystack-0.9/debian/.git-dpm celery-haystack-0.10/debian/.git-dpm --- celery-haystack-0.9/debian/.git-dpm 1970-01-01 00:00:00.000000000 +0000 +++ celery-haystack-0.10/debian/.git-dpm 2016-01-02 12:55:11.000000000 +0000 @@ -0,0 +1,8 @@ +# see git-dpm(1) from git-dpm package +410c322761b0ea12391a56d587cd5cf634ade205 +410c322761b0ea12391a56d587cd5cf634ade205 +8a058bc8b48df136b3583fba8df9d246ab395c2b +8a058bc8b48df136b3583fba8df9d246ab395c2b +celery-haystack_0.10.orig.tar.gz +5c227a82c052ea84b05b12da0c9f5f3aa4d8e85e +8299 diff -Nru celery-haystack-0.9/debian/patches/0001-Add-the-recommended-minimum-MIDDLEWARE_CLASSES.patch celery-haystack-0.10/debian/patches/0001-Add-the-recommended-minimum-MIDDLEWARE_CLASSES.patch --- celery-haystack-0.9/debian/patches/0001-Add-the-recommended-minimum-MIDDLEWARE_CLASSES.patch 1970-01-01 00:00:00.000000000 +0000 +++ celery-haystack-0.10/debian/patches/0001-Add-the-recommended-minimum-MIDDLEWARE_CLASSES.patch 2016-01-02 12:55:11.000000000 +0000 @@ -0,0 +1,27 @@ +From 410c322761b0ea12391a56d587cd5cf634ade205 Mon Sep 17 00:00:00 2001 +From: Michael Fladischer +Date: Fri, 25 Dec 2015 15:02:58 +0100 +Subject: Add the recommended minimum MIDDLEWARE_CLASSES. + + This silences warnings while running the tests. +Forwarded: no +Last-Update: 2015-08-11 +--- + celery_haystack/test_settings.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/celery_haystack/test_settings.py b/celery_haystack/test_settings.py +index def8536..b14c0d7 100644 +--- a/celery_haystack/test_settings.py ++++ b/celery_haystack/test_settings.py +@@ -26,6 +26,10 @@ DATABASES = { + + SECRET_KEY = 'really-not-secret' + ++MIDDLEWARE_CLASSES = ( ++ 'django.middleware.common.CommonMiddleware', ++) ++ + BROKER_TRANSPORT = "memory" + CELERY_ALWAYS_EAGER = True + CELERY_IGNORE_RESULT = True diff -Nru celery-haystack-0.9/debian/patches/django1.7_test_middleware.patch celery-haystack-0.10/debian/patches/django1.7_test_middleware.patch --- celery-haystack-0.9/debian/patches/django1.7_test_middleware.patch 2015-08-11 11:15:46.000000000 +0000 +++ celery-haystack-0.10/debian/patches/django1.7_test_middleware.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -Description: Add the recommended minimum MIDDLEWARE_CLASSES. - This silences warnings while running the tests. -Forwarded: no -Author: Michael Fladischer -Last-Update: 2015-08-11 -Index: celery-haystack/celery_haystack/test_settings.py -=================================================================== ---- celery-haystack.orig/celery_haystack/test_settings.py 2015-08-11 12:02:19.680979687 +0200 -+++ celery-haystack/celery_haystack/test_settings.py 2015-08-11 12:28:19.052790585 +0200 -@@ -28,6 +28,10 @@ - - SECRET_KEY = 'really-not-secret' - -+MIDDLEWARE_CLASSES = ( -+ 'django.middleware.common.CommonMiddleware', -+) -+ - BROKER_TRANSPORT = "memory" - CELERY_ALWAYS_EAGER = True - CELERY_IGNORE_RESULT = True diff -Nru celery-haystack-0.9/debian/patches/series celery-haystack-0.10/debian/patches/series --- celery-haystack-0.9/debian/patches/series 2015-08-11 11:15:46.000000000 +0000 +++ celery-haystack-0.10/debian/patches/series 2016-01-02 12:55:11.000000000 +0000 @@ -1 +1 @@ -django1.7_test_middleware.patch +0001-Add-the-recommended-minimum-MIDDLEWARE_CLASSES.patch diff -Nru celery-haystack-0.9/debian/watch celery-haystack-0.10/debian/watch --- celery-haystack-0.9/debian/watch 2015-08-11 11:15:46.000000000 +0000 +++ celery-haystack-0.10/debian/watch 2016-01-02 12:55:11.000000000 +0000 @@ -1,4 +1,3 @@ version=3 -opts=filenamemangle=s/.+\/v([\d\.]+)\.tar\.gz/celery-haystack-$1.tar.gz/ \ -https://github.com/django-haystack/celery-haystack/releases \ -/django-haystack/celery-haystack/archive/v([\d\.]+)\.tar\.gz +opts=uversionmangle=s/(rc|a|b|c)/~$1/ \ +https://pypi.debian.net/celery-haystack/celery-haystack-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) diff -Nru celery-haystack-0.9/docs/changelog.rst celery-haystack-0.10/docs/changelog.rst --- celery-haystack-0.9/docs/changelog.rst 2015-06-13 14:40:27.000000000 +0000 +++ celery-haystack-0.10/docs/changelog.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,167 +0,0 @@ -Changelog -========= - -v0.9 (2015-06-13) ------------------ - -* Moved to Haystack GitHub org: https://github.com/django-haystack/celery-haystack - -* Fix handling the default Haystack backend alias, making it a list. - -* Added ``CELERY_HAYSTACK_QUEUE`` setting to define which Celery queue to use. - -* Added ``CELERY_HAYSTACK_COUNTDOWN`` setting to define when to start the - indexing task after initially creating it. - -* Stop returning after after enqueing in the Haystack router to support - multple routers. - -* Optionally support using django-transaction-hooks for improved transaction - handling. - -* Instantiate update task class correctly. - -* Use Celery's task logger utility function. - -v0.8 (2014-07-31) ------------------ - -* Fix bug when using multiple Haystack indizes - -* Fixed merge bug where primary key of object was cast to int - -* Add compatibility for Python 3.3, 3.4, Celery 3.X - -v0.7.2 (2013-03-23) -------------------- - -* Fixed import time issue with Haystack 2.X. - -* Minor fixes to the README. - -* Made signal processor compatible for subclassing for easier extensibility. - -v0.7.1 (2013-03-09) -------------------- - -* Fixed an installation issues with d2to1. - -v0.7 (2013-03-09) ------------------ - -* **Backwards incompatible** change to support the new signal processor API - in Haystack 2.X. To upgrade simply add this to your settings:: - - HAYSTACK_SIGNAL_PROCESSOR = 'celery_haystack.signals.CelerySignalProcessor' - - Many thanks to Stefan Wehrmeyer for the help. - -* Simplified index class implementation. - -* Support multiple indexes in the task. Thanks, Stefan Wehrmeyer. - -* Use the exception handler of the task logger instead of the error handler - when catching an exception. - -* Switched to d2to1_ for handling package metadata. - -.. _d2to1: http://pypi.python.org/pypi/d2to1 - -v0.6.2 (2012-06-28) -------------------- - -* Fixed AttributeError in settings handling. - -v0.6.1 (2012-06-27) -------------------- - -* Fixed logging setup. - -v0.6 (2012-06-27) ------------------ - -* **backwards incompatible change** - - Added support for `django-celery-transactions`_ to make sure the tasks - are respecting Django's transaction management. It holds on to Celery tasks - until the current database transaction is committed, avoiding potential - race conditions as described in `Celery's user guide`_. - - This is **enabled by default** but can be disabled in case you want - to manually manage the transactions:: - - CELERY_HAYSTACK_TRANSACTION_SAFE = False - -* Refactored the error handling to always return a message about what - happened in every step of the index interaction. Raises exception about - misconfiguration and wrong parameters quicker. - -* Improved support for multiple search indexes as implemented by - Haystack 2.X. Many thanks to Germán M. Bravo (Kronuz). - -.. _`django-celery-transactions`: https://github.com/chrisdoble/django-celery-transactions -.. _`Celery's user guide`: http://celery.readthedocs.org/en/latest/userguide/tasks.html#database-transactions - -v0.5 (2012-05-23) ------------------ - -* Moved repository to personal account again: http://github.com/jezdez/celery-haystack - -* Removed versiontools dependency again. - -* Moved to using Travis-CI for tests: http://travis-ci.org/jezdez/celery-haystack - -v0.4 (2011-09-17) ------------------ - -* Fixed bug which caused the deletion of an item to not happen correctly. - Please rebuild your Haystack indexes using the ``rebuild_index`` - management command. - -* Addded initial Sphinx documentation: http://celery-haystack.rtfd.org - -* Revamped the tets to test the search results, not only queuing. - -v0.3.1 (2011-08-22) -------------------- - -* Minor bugfix in new appconf support code. - -v0.3 (2011-08-22) ------------------ - -* Moved configuration defaults handling to django-appconf_. - -* Fixed issue that occured when retrying a task. - -.. _django-appconf: http://pypi.python.org/pypi/django-appconf - -v0.2.1 (2011-08-05) -------------------- - -* Fixed typo in exception message handling. - -v0.2 (2011-08-04) ------------------ - -* Added support for Haystack 1.2.X. - -* Properly stop indexing if instance couldn't be found. - -* Forced Celery task config values to be of the correct type. - -v0.1.2 (2011-07-29) and v0.1.3 (2011-08-01) -------------------------------------------- - -* Removed stale print statement. - -v0.1.1 (2011-07-29) -------------------- - -* Fixed packaging issue (added manifest template). - - -v0.1 (2011-07-29) ------------------ - -* Initial release. diff -Nru celery-haystack-0.9/docs/conf.py celery-haystack-0.10/docs/conf.py --- celery-haystack-0.9/docs/conf.py 2015-06-13 14:40:27.000000000 +0000 +++ celery-haystack-0.10/docs/conf.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,228 +0,0 @@ -# -*- coding: utf-8 -*- -# -# celery-haystack documentation build configuration file, created by -# sphinx-quickstart on Sat Sep 17 14:02:10 2011. -# -# This file is execfile()d with the current directory set to its containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import sys, os - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) - -# -- General configuration ----------------------------------------------------- - -# If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be extensions -# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx'] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix of source filenames. -source_suffix = '.rst' - -# The encoding of source files. -#source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'celery-haystack' -copyright = u'2011-2013, Jannis Leidel and contributors' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -try: - from celery_haystack import __version__ - # The short X.Y version. - version = '.'.join(__version__.split('.')[:2]) - # The full version, including alpha/beta/rc tags. - release = __version__ -except ImportError: - version = release = 'dev' - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -#language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns = ['_build'] - -# The reST default role (used for this markup: `text`) to use for all documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -#show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] - - -# -- Options for HTML output --------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = 'default' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -#html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -# html_static_path = ['_static'] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -#html_additional_pages = {} - -# If false, no module index is generated. -#html_domain_indices = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None - -# Output file base name for HTML help builder. -htmlhelp_basename = 'celery-haystackdoc' - - -# -- Options for LaTeX output -------------------------------------------------- - -# The paper size ('letter' or 'a4'). -#latex_paper_size = 'letter' - -# The font size ('10pt', '11pt' or '12pt'). -#latex_font_size = '10pt' - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, documentclass [howto/manual]). -latex_documents = [ - ('index', 'celery-haystack.tex', u'celery-haystack Documentation', - u'Jannis Leidel', 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -#latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# If true, show page references after internal links. -#latex_show_pagerefs = False - -# If true, show URL addresses after external links. -#latex_show_urls = False - -# Additional stuff for the LaTeX preamble. -#latex_preamble = '' - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_domain_indices = True - - -# -- Options for manual page output -------------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ('index', 'celery-haystack', u'celery-haystack Documentation', - [u'Jannis Leidel'], 1) -] - - -# Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = { - 'python': ('http://docs.python.org/2.7', None), - 'sphinx': ('http://sphinx.pocoo.org/', None), - 'django': ('http://django.readthedocs.org/en/latest/', None), -} diff -Nru celery-haystack-0.9/docs/index.rst celery-haystack-0.10/docs/index.rst --- celery-haystack-0.9/docs/index.rst 2015-06-13 14:40:27.000000000 +0000 +++ celery-haystack-0.10/docs/index.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -.. include:: ../README.rst - -Contents: - -.. toctree:: - :maxdepth: 2 - - changelog diff -Nru celery-haystack-0.9/docs/make.bat celery-haystack-0.10/docs/make.bat --- celery-haystack-0.9/docs/make.bat 2015-06-13 14:40:27.000000000 +0000 +++ celery-haystack-0.10/docs/make.bat 1970-01-01 00:00:00.000000000 +0000 @@ -1,170 +0,0 @@ -@ECHO OFF - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set BUILDDIR=_build -set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . -if NOT "%PAPER%" == "" ( - set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% -) - -if "%1" == "" goto help - -if "%1" == "help" ( - :help - echo.Please use `make ^` where ^ is one of - echo. html to make standalone HTML files - echo. dirhtml to make HTML files named index.html in directories - echo. singlehtml to make a single large HTML file - echo. pickle to make pickle files - echo. json to make JSON files - echo. htmlhelp to make HTML files and a HTML help project - echo. qthelp to make HTML files and a qthelp project - echo. devhelp to make HTML files and a Devhelp project - echo. epub to make an epub - echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter - echo. text to make text files - echo. man to make manual pages - echo. changes to make an overview over all changed/added/deprecated items - echo. linkcheck to check all external links for integrity - echo. doctest to run all doctests embedded in the documentation if enabled - goto end -) - -if "%1" == "clean" ( - for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i - del /q /s %BUILDDIR%\* - goto end -) - -if "%1" == "html" ( - %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/html. - goto end -) - -if "%1" == "dirhtml" ( - %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. - goto end -) - -if "%1" == "singlehtml" ( - %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. - goto end -) - -if "%1" == "pickle" ( - %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the pickle files. - goto end -) - -if "%1" == "json" ( - %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the JSON files. - goto end -) - -if "%1" == "htmlhelp" ( - %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run HTML Help Workshop with the ^ -.hhp project file in %BUILDDIR%/htmlhelp. - goto end -) - -if "%1" == "qthelp" ( - %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run "qcollectiongenerator" with the ^ -.qhcp project file in %BUILDDIR%/qthelp, like this: - echo.^> qcollectiongenerator %BUILDDIR%\qthelp\celery-haystack.qhcp - echo.To view the help file: - echo.^> assistant -collectionFile %BUILDDIR%\qthelp\celery-haystack.ghc - goto end -) - -if "%1" == "devhelp" ( - %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. - goto end -) - -if "%1" == "epub" ( - %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The epub file is in %BUILDDIR%/epub. - goto end -) - -if "%1" == "latex" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "text" ( - %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The text files are in %BUILDDIR%/text. - goto end -) - -if "%1" == "man" ( - %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The manual pages are in %BUILDDIR%/man. - goto end -) - -if "%1" == "changes" ( - %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes - if errorlevel 1 exit /b 1 - echo. - echo.The overview file is in %BUILDDIR%/changes. - goto end -) - -if "%1" == "linkcheck" ( - %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck - if errorlevel 1 exit /b 1 - echo. - echo.Link check complete; look for any errors in the above output ^ -or in %BUILDDIR%/linkcheck/output.txt. - goto end -) - -if "%1" == "doctest" ( - %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest - if errorlevel 1 exit /b 1 - echo. - echo.Testing of doctests in the sources finished, look at the ^ -results in %BUILDDIR%/doctest/output.txt. - goto end -) - -:end diff -Nru celery-haystack-0.9/docs/Makefile celery-haystack-0.10/docs/Makefile --- celery-haystack-0.9/docs/Makefile 2015-06-13 14:40:27.000000000 +0000 +++ celery-haystack-0.10/docs/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,130 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - -rm -rf $(BUILDDIR)/* - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/celery-haystack.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/celery-haystack.qhc" - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/celery-haystack" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/celery-haystack" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - make -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." diff -Nru celery-haystack-0.9/.gitignore celery-haystack-0.10/.gitignore --- celery-haystack-0.9/.gitignore 2015-06-13 14:40:27.000000000 +0000 +++ celery-haystack-0.10/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -.DS_Store -*.pyc -celery_haystack/tests/whoosh_index -*.egg -*.egg-info -.coverage -docs/_build -build/ -dist/ -.eggs/ -MANIFEST diff -Nru celery-haystack-0.9/PKG-INFO celery-haystack-0.10/PKG-INFO --- celery-haystack-0.9/PKG-INFO 1970-01-01 00:00:00.000000000 +0000 +++ celery-haystack-0.10/PKG-INFO 2015-12-30 17:34:52.000000000 +0000 @@ -0,0 +1,117 @@ +Metadata-Version: 1.1 +Name: celery-haystack +Version: 0.10 +Summary: An app for integrating Celery with Haystack. +Home-page: http://celery-haystack.rtfd.org/ +Author: Jannis Leidel +Author-email: jannis@leidel.info +License: UNKNOWN +Description: =============== + celery-haystack + =============== + + .. image:: https://secure.travis-ci.org/django-haystack/celery-haystack.png?branch=develop + :alt: Build Status + :target: http://travis-ci.org/django-haystack/celery-haystack + + This Django app allows you to utilize Celery for automatically updating and + deleting objects in a Haystack_ search index. + + Requirements + ------------ + + * Django 1.8+ + * Haystack_ `2.X`_ + * Celery_ 3.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: http://www.celeryproject.org + + + Installation + ------------ + + Use your favorite Python package manager to install the app from PyPI, e.g.:: + + pip install celery-haystack + + + 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 `Github issue tracker`_ for any bug reports or feature + requests. + + .. _`Github issue tracker`: https://github.com/django-haystack/celery-haystack/issues + + +Platform: UNKNOWN +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 +Classifier: Programming Language :: Python :: 2.6 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3.3 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Topic :: Utilities diff -Nru celery-haystack-0.9/README.rst celery-haystack-0.10/README.rst --- celery-haystack-0.9/README.rst 2015-06-13 14:40:27.000000000 +0000 +++ celery-haystack-0.10/README.rst 2015-12-30 17:29:31.000000000 +0000 @@ -12,8 +12,8 @@ Requirements ------------ -* Django 1.4+ -* Haystack_ `1.2.X`_ *or* `2.X`_ +* Django 1.8+ +* Haystack_ `2.X`_ * Celery_ 3.X You also need to install your choice of one of the supported search engines @@ -21,8 +21,8 @@ .. _Haystack: http://haystacksearch.org -.. _`1.2.X`: http://pypi.python.org/pypi/django-haystack/1.2.5 -.. _`2.X`: https://github.com/toastdriven/django-haystack/tree/master +.. _Celery: http://www.celeryproject.org + Installation ------------ @@ -31,52 +31,16 @@ pip install celery-haystack -By default a few dependencies will automatically be installed: -- django-appconf_ -- An app to gracefully handle application settings. +For Django < 1.9 you need to install and configure `django-transaction-hooks`_ -- an app that +brings transaction commit hooks to Django. -- `django-celery-transactions`_ -- An app that "holds on to Celery tasks - until the current database transaction is committed, avoiding potential - race conditions as described in `Celery's user guide`_." +.. _django-transaction-hooks: https://github.com/carljm/django-transaction-hooks -.. _django-appconf: http://pypi.python.org/pypi/django-appconf -.. _`django-celery-transactions`: https://github.com/chrisdoble/django-celery-transactions -.. _`Celery's user guide`: http://celery.readthedocs.org/en/latest/userguide/tasks.html#database-transactions Usage ----- -Haystack 1.X -~~~~~~~~~~~~ - -1. Add ``'celery_haystack'`` to the ``INSTALLED_APPS`` setting - - .. code:: python - - INSTALLED_APPS = [ - # .. - 'celery_haystack', - ] - -2. Alter all of your ``SearchIndex`` subclasses to inherit from - ``celery_haystack.indexes.CelerySearchIndex`` - - .. code:: python - - from haystack import site, indexes - from celery_haystack.indexes import CelerySearchIndex - from myapp.models import Note - - class NoteIndex(CelerySearchIndex): - text = indexes.CharField(document=True, model_attr='content') - - site.register(Note, NoteIndex) - -3. Ensure your Celery instance is running. - -Haystack 2.X -~~~~~~~~~~~~ - 1. Add ``'celery_haystack'`` to the ``INSTALLED_APPS`` setting .. code:: python diff -Nru celery-haystack-0.9/requirements/v1.txt celery-haystack-0.10/requirements/v1.txt --- celery-haystack-0.9/requirements/v1.txt 2015-06-13 14:40:27.000000000 +0000 +++ celery-haystack-0.10/requirements/v1.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -django-discover-runner -django-haystack==1.2.7 -django-celery -celery -whoosh<2.5 -flake8 -coverage diff -Nru celery-haystack-0.9/requirements/v2.txt celery-haystack-0.10/requirements/v2.txt --- celery-haystack-0.9/requirements/v2.txt 2015-06-13 14:40:27.000000000 +0000 +++ celery-haystack-0.10/requirements/v2.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -django-discover-runner -https://github.com/toastdriven/django-haystack/tarball/master -django-celery -celery -Whoosh -flake8 -coverage diff -Nru celery-haystack-0.9/setup.cfg celery-haystack-0.10/setup.cfg --- celery-haystack-0.9/setup.cfg 2015-06-13 14:40:27.000000000 +0000 +++ celery-haystack-0.10/setup.cfg 2015-12-30 17:34:52.000000000 +0000 @@ -1,6 +1,6 @@ [global] -setup-hooks = - celery_haystack.version_hook +setup-hooks = + celery_haystack.version_hook [metadata] name = celery-haystack @@ -9,36 +9,40 @@ summary = An app for integrating Celery with Haystack. description-file = README.rst home-page = http://celery-haystack.rtfd.org/ -project-url = - Github, https://github.com/django-haystack/celery-haystack/ -classifier = - Development Status :: 4 - Beta - Environment :: Web Environment - Framework :: Django - Intended Audience :: Developers - License :: OSI Approved :: BSD License - Operating System :: OS Independent - Programming Language :: Python - Programming Language :: Python :: 2.6 - Programming Language :: Python :: 2.7 - Programming Language :: Python :: 3.3 - Programming Language :: Python :: 3.4 - Topic :: Utilities -requires-dist = - django-appconf>=0.4.1 - django-celery-transactions>=0.1.2 - +project-url = + Github, https://github.com/django-haystack/celery-haystack/ +classifier = + Development Status :: 4 - Beta + Environment :: Web Environment + Framework :: Django + Intended Audience :: Developers + License :: OSI Approved :: BSD License + Operating System :: OS Independent + Programming Language :: Python + Programming Language :: Python :: 2.6 + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 3.3 + Programming Language :: Python :: 3.4 + Topic :: Utilities +requires-dist = + django-appconf>=0.4.1 [files] -packages = - celery_haystack - celery_haystack.tests -extra_files = - README.rst - AUTHORS +packages = + celery_haystack + celery_haystack.tests +extra_files = + README.rst + AUTHORS [backwards_compat] zip_safe = False [wheel] universal = 1 + +[egg_info] +tag_build = +tag_date = 0 +tag_svn_revision = 0 + diff -Nru celery-haystack-0.9/.travis.yml celery-haystack-0.10/.travis.yml --- celery-haystack-0.9/.travis.yml 2015-06-13 14:40:27.000000000 +0000 +++ celery-haystack-0.10/.travis.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -language: python -python: - - "2.6" - - "2.7" - - "3.3" - - "3.4" -before_install: - - export DJANGO_SETTINGS_MODULE=celery_haystack.test_settings -install: - - pip install -e . - - pip install -r requirements/$HAYSTACK.txt $DJANGO -before_script: - - flake8 celery_haystack --ignore=E501 -script: - - coverage run --branch --source=celery_haystack `which django-admin.py` test celery_haystack - - coverage report --omit=celery_haystack/test* -env: - - DJANGO="Django==1.4.20" HAYSTACK=v1 - - DJANGO="Django==1.4.20" HAYSTACK=v2 - - DJANGO="Django==1.7.8" HAYSTACK=v1 - - DJANGO="Django==1.7.8" HAYSTACK=v2 - - DJANGO="Django==1.8.2" HAYSTACK=v2 -matrix: - exclude: - - env: DJANGO="Django==1.4.20" HAYSTACK=v1 - python: "3.3" - - env: DJANGO="Django==1.4.20" HAYSTACK=v2 - python: "3.3" - - env: DJANGO="Django==1.4.20" HAYSTACK=v1 - python: "3.4" - - env: DJANGO="Django==1.4.20" HAYSTACK=v2 - python: "3.4" - - env: DJANGO="Django==1.7.8" HAYSTACK=v1 - python: "2.6" - - env: DJANGO="Django==1.7.8" HAYSTACK=v2 - python: "2.6" - - env: DJANGO="Django==1.8.2" HAYSTACK=v1 - python: "2.6" - - env: DJANGO="Django==1.8.2" HAYSTACK=v2 - python: "2.6" - - env: DJANGO="Django==1.7.8" HAYSTACK=v1 - python: "3.3" - - env: DJANGO="Django==1.7.8" HAYSTACK=v1 - python: "3.4" - - env: DJANGO="Django==1.8.2" HAYSTACK=v1 - python: "3.3" - - env: DJANGO="Django==1.8.2" HAYSTACK=v1 - python: "3.4"