Coder Social home page Coder Social logo

akuchling / celery-simple-elasticsearch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jimjkelly/celery-simple-elasticsearch

1.0 1.0 0.0 29 KB

Provides the ability to re-index Django models via celery workers on update.

License: Other

Python 100.00%

celery-simple-elasticsearch's Introduction

celery-simple-elasticsearch

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

Requirements

Installation

Use your favorite Python package manager to install the app from PyPI, e.g.:

pip install celery-simple-elasticsearch

By default a few dependencies will automatically be installed:

Usage

  1. Add 'celery_simple_elasticsearch' to the INSTALLED_APPS setting

    INSTALLED_APPS = [
        # ..
        'celery_simple_elasticsearch',
    ]
  2. Alter all of your ElasticsearchIndexMixin subclasses to also inherit from celery_simple_elasticsearch.indexes.CelerySearchIndex

    from django.db import models
    from celery_simple_elasticsearch.indexes import CelerySearchIndex
    from simple_elasticsearch.mixins import ElasticsearchIndexMixin
    
    class Person(CelerySearchIndex, ElasticsearchIndexMixin, models.Model):
      first_name = models.CharField(max_length=30)
      last_name = models.CharField(max_length=30)
  3. Ensure your Celery instance is running.

Thanks

This app is a blatant rip-off of Celery Haystack. A great basis, but I didn't want Haystack users to have all the celery goodness to themselves.

Issues

Please use the Github issue tracker for any bug reports or feature requests.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.