Skip to main content

Celery signal processor for Bungiesearch

Project description

https://travis-ci.org/afrancis13/celery-bungiesearch.svg?branch=master

A repository that wraps the provided Bungiesearch signal processing class in your own celery tasks.

This Django app allows you to utilize Celery for automatically updating and deleting objects in a Bungiesearch search index.

Compatible with most recent version of Bungiesearch, which is similar to Haystack, but interacts directly with elasticsearch-dsl and therefore allows for more custom ranking functions.

Install

pip install celery-bungiesearch

Requirements

Usage

1. Add 'celery_bungiesearch' to INSTALLED_APPS in settings

INSTALLED_APPS = [
    # ..
    'celery_bungiesearch',
]

2. Add CelerySignalProcessor to settings.BUNGIESEARCH['SIGNAL_CLASS'] in settings. This will ensure that any model that’s managed by a BungiesearchManager acquire CelerySignalProcessor as the signal processor.

from celery_bungiesearch import CelerySignalProcessor

BUNGIESEARCH = {
   # ..
   'SIGNALS': {
       'SIGNAL_CLASS': 'celery_bungiesearch.signals.CelerySignalProcessor',
       'BUFFER_SIZE' : 100
   }
}

3. Add celery-bungisearch configuration variables to your settings file. The task below is the default version, but you may include your own custom classes if you desire (note that none of these environment variable are required, and can be entirely excluded from the settings file):

CELERY_BUNGIESEARCH_QUEUE = None
CELERY_BUNGIESEARCH_TASK = 'Your custom index task path'
CELERY_BUNGIESEARCH_CUSTOM_TASK = 'Your custom celery task path'

4. Ensure your Celery instance is running.

Testing

You can run tests locally for celery-bungiesearch by simply running the command tox or tox test. You must have an instance of elasticsearch running locally. You can also run tests using continuous integration with Travis CI (build status at the top of this README).

Thanks

This application borrows liberally from Jannis Leidel’s celery-haystack and from Christopher Rabotin’s Bungiesearch, which itself was the inspiration for this project.

Issues

Please submit a pull request or use the Github issue tracker for any bug fixes, bug reports, or feature requests.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

celery-bungiesearch-1.2.2.tar.gz (7.1 kB view details)

Uploaded Source

File details

Details for the file celery-bungiesearch-1.2.2.tar.gz.

File metadata

File hashes

Hashes for celery-bungiesearch-1.2.2.tar.gz
Algorithm Hash digest
SHA256 ffcf0ed34a2405c92b81919a3017bbc130864f85fb2f538bbb525ece8f69a1bb
MD5 accbbd5f6fc46833157b5caca41a464d
BLAKE2b-256 6d5b8c3fcae3bdfa2e4e5e30c4b00447549bc5f97c698c8f5ecf0feef8418b3d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page