GithubHelp home page GithubHelp logo

verisage / aldryn-celery Goto Github PK

View Code? Open in Web Editor NEW

This project forked from divio/aldryn-celery

0.0 1.0 0.0 23 KB

An opinionated Celery setup bundled as an Aldryn Addon. To be used together with aldryn-django.

License: Other

Python 100.00%

aldryn-celery's Introduction

=============
Aldryn Celery
=============

|PyPI Version|

An opinionated Celery setup bundled as an Aldryn Addon.
To be used together with aldryn-django.

Contributing
============

This is a an open-source project. We'll be delighted to receive your
feedback in the form of issues and pull requests. Before submitting your
pull request, please review our `contribution guidelines
<http://docs.django-cms.org/en/latest/contributing/index.html>`_.

We're grateful to all contributors who have helped create and maintain this package.
Contributors are listed at the `contributors <https://github.com/divio/aldryn-celery/graphs/contributors>`_
section.

======================
Installation & Updates
======================

`Installation Documentation on docs.divio.com <http://docs.divio.com/en/latest/how-to/configure-celery.html>`_

*********************
Aldryn Platform Users
*********************

Ask Aldryn staff to add this Addon to your Project. It is currently still
hidden.

Aldryn staff has to:
 * provision a rabbitmq vhost and set the ``BROKER_URL`` environment variable.
 * configure the additional worker processes to run in the background (celeryd,
   celerybeat and celerycam)


*******************
Manual Installation
*******************

tbd.


Usage
=====

rough notes:

see ``aldryn_config.py`` to see the environment variables that can be used as
knobs.

Use the following commands to start the celery processes:

* ``aldryn-celery worker``
* ``aldryn-celery beat``
* ``aldryn-celery cam``

Local setup on Aldryn Platform
==============================

Add the following services to your ``docker-compose.yml`` file::

    celeryworker:
      command: aldryn-celery worker
    celerybeat:
      command: aldryn-celery beat
    celerycam:
      command: aldryn-celery cam
    rabbitmq:
      image: rabbitmq:3.5-management
      hostname: rabbitmq
      ports:
        - "15672:15672"
      expose:
        - "15672"
      environment:
        RABBITMQ_ERLANG_COOKIE: "secret cookie here"

For ``celeryworker``, ``celerybeat`` and ``celerycam`` copy in all the options from the ``web`` service, except ``ports``.

In ``web``, ``celeryworker``, ``celerybeat`` and ``celerycam`` add::

    links:
      - "rabbitmq:rabbitmq"

In ``.env-local`` add the following::

    RABBITMQ_ERLANG_COOKIE="secret cookie here"
    BROKER_URL="amqp://guest:guest@rabbitmq:5672/"

``docker-compose up`` or ``divio project up`` will now also startup celery.
Run ``docker-compose stop web && docker-compose rm web && docker-compose up -d web`` for the ``web`` service to pick up the new env vars.
Keep in mind, that celery does not auto reload on code changes. So you need to ``docker-compose restart celeryworker`` after every code change.

.. |PyPI Version| image:: http://img.shields.io/pypi/v/aldryn-celery.svg
   :target: https://pypi.python.org/pypi/aldryn-celery

aldryn-celery's People

Contributors

stefanfoulis avatar chive avatar czpython avatar vthaian avatar

Watchers

James Cloos avatar

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.