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
Metadata
Release files for leonardo-celery 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| leonardo-celery-0.1.2.tar.gz | 3.5 kB | Details |
Release files / leonardo-celery-0.1.2.tar.gz
| Download URL | leonardo-celery-0.1.2.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e5fc2f7584dc2d85df47f8fcebd00e183a51137b88dbd7ece4b1e69733ffde6
|
|
BLAKE2b-256 checksum How to use checksums |
40dccbf5a69d23bea8f4ebd5ab97ce753da9c3a2f75b919364f96ef82d61fba6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |