Tag: celery
-
Celery Worker wide configuration
Celery is a distributed task execution environment for Python. While the emphasis is on distributed in this software, the concept of having workers allows for settings beyond the individual task. While the first rule of optimisation is “don’t”, sharing database connections is a low hanging fruit in most cases. And this can be configured per worker with Celery…
-
Django with Celery
Erste Schritte mit Celery und Django-Celery Installation: In debian wheezy, einfach folgende Pakete installieren: python-celery python-django-celery settings.py: INSTALLED_APPS = ( …, ‘djcelery’, ‘kombu.transport.django’, …, ) import djcelery djcelery.setup_loader() BROKER_URL=”django://” PROJECT/APP/tasks.py: from celery.task import Task from celery.registry import tasks class SomeTask(Task): def run(self, SomeArg, **kwargs): return SomeResult tasks.register(SomeTask) celeryd: ./manage.py celeryd Allerdings produziert…