Skip to main content
Help us improve Python packaging – donate today!

Celery integration with Tryton

Project Description

Celery integration with Tryton. It defines an abstract base Task class that runs inside a Tryton transaction.

Getting Started

Here is a simple application:

from celery import Celery
from celery_tryton import TrytonTask
from trytond.pool import Pool

celery = Celery('hello', broker='amqp://guest@localhost//')
celery.conf.TRYTON_DATABASE = 'test'

@celery.task(base=TrytonTask)
def hello(user_id):
    User = Pool().get('res.user')
    user = User(user_id)
    return 'hello world, %s' % user.name

Configuration

All standard celery configuration options will work but in addition TRYTON_DATABASE must be set to the Tryton database name and optionally TRYTON_CONFIG to load a specific configuration file.

Example

Start a worker:

$ celery worker --app=examples.purchase_requests

Call generate_all task:

$ celery call examples.purchase_requests.generate_all

For more information please visit the celery_tryton website.

Release history Release notifications

History Node

0.3

History Node

0.2

This version
History Node

0.1

History Node

0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
celery_tryton-0.1.tar.gz (3.8 kB) Copy SHA256 hash SHA256 Source None Feb 15, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page