Skip to main content

Background workers for Leonardo CMS

Project description

This module provide worker for hard work around periodical syncing and updating caches, sending emails or whatever you need do asynchronously.

Installation

pip install leonardo-celery
pip install django-leonardo[celery]

Settings

BROKER_URL = 'redis://localhost:6379/0'

BROKER_URL = 'amqp://user:password@127.0.0.1:5672/leonardo'

Set custom scheduler and result backend

CELERY_RESULT_BACKEND = 'djcelery.backends.database:DatabaseBackend'

CELERYBEAT_SCHEDULER = "djcelery.schedulers.DatabaseScheduler"

Start worker

python manage.py celery worker -B -E

Syncing state

For syncing state to databse run celerycam

python manage.py celerycam

Tasks are discovered by standard mechanism:

app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)

Use smart caching

Use cacheback jobs for fetching data asynchronously.

pip install leonardo-celery[cacheback]

Define your jobs. More about Jobs http://django-cacheback.readthedocs.org/en/latest/usage.html#as-an-instance-of-cacheback-job

Read More

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

leonardo-celery-0.1.2.tar.gz (3.5 kB view details)

Uploaded Source

File details

Details for the file leonardo-celery-0.1.2.tar.gz.

File metadata

File hashes

Hashes for leonardo-celery-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2e5fc2f7584dc2d85df47f8fcebd00e183a51137b88dbd7ece4b1e69733ffde6
MD5 8784eb5eebfa06579401b9b7e2c998d0
BLAKE2b-256 40dccbf5a69d23bea8f4ebd5ab97ce753da9c3a2f75b919364f96ef82d61fba6

See more details on using hashes here.

Supported by

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