Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

Celery integration with Tryton. It defines an abstract base Task class that runs inside a Tryton transaction. If the task is called from within a Tryton transaction, the context of this one will be automatically restored when the worker will execute it.

Getting Started

Here is a simple application:

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

celery_app.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 default Tryton database name and optionally TRYTON_CONFIG to load a specific configuration file.

The celery_app will load the configuration from the config value from the section [celery] defined in the trytond configuration when used from a Tryton module.

Example

Start a worker:

$ celery worker --app=examples.purchase_requests

Call generate_all task:

$ celery call examples.purchase_requests.generate_all

To report issues please visit the celery_tryton bugtracker.

Release files for celery_tryton 0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for celery_tryton 0.4
File Size Uploaded
celery_tryton-0.4.tar.gz 4.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for celery_tryton 0.4
File Interpreter ABI Platform
celery_tryton-0.4-py3-none-any.whl Python 3 none any Details
celery_tryton-0.4-py2-none-any.whl Python 2 none any Details

Total release size: 15.8 kB

Release files / celery_tryton-0.4.tar.gz

Download URL celery_tryton-0.4.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
854525a3ecba163e68521bb9eadb6b3e3d48a5da5422fc72cce64d1dd0a492f8
BLAKE2b-256 checksum
How to use checksums
be166cf2d4ddf9511d556a9130337eb09a5b121fc25c05300d8dcb09bddada2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/36.7.2 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/2.7.15

Release files / celery_tryton-0.4-py3-none-any.whl

Download URL celery_tryton-0.4-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d205b8e9ce870ab5ab543f291fad46841dea6851f6d2592f8d8ed3ccda40519
BLAKE2b-256 checksum
How to use checksums
5dd6cc22429d6fd81e4268bc5931bb7744399cb25089d2ae535722dce96e3834
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/36.7.2 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/2.7.15

Release files / celery_tryton-0.4-py2-none-any.whl

Download URL celery_tryton-0.4-py2-none-any.whl
Size 5.6 kB
Tags Python 2
SHA-256 checksum
How to use checksums
4920524557e858bd2feac5fcb0492c41f8f8254e3110f1b064cbc7d259e08164
BLAKE2b-256 checksum
How to use checksums
f902bb1507868d33ba4c50fd5372bf77204d76d35ef67eaaa8cfbea3b6a0afc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/36.7.2 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/2.7.15

Release history Release notifications | RSS feed

This release

0.4 This release

3 release files

0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page