M
M
Morg4n2015-12-06 10:09:08
Django
Morg4n, 2015-12-06 10:09:08

How to use celery local settings in django?

I have a django app with a bunch of periodic jobs in celery that needs to be written in local_settings to run _only_ one particular job.
I tried doing this, but it doesn't help:

BROKER_URL = 'amqp://test:[email protected]/'
CELERYBEAT_SCHEDULER = "djcelery.schedulers.DatabaseScheduler"
CELERYBEAT_SCHEDULE = {
    "test_task": {
        "task": "test.ptask",
        "schedule": crontab(minute="*/5"),
        "options": {'queue': 'slow_tasks'}
    }
}

Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Morg4n, 2015-12-06
@Morg4n

Properly start the worker as follows

manage.py celery -A app_name worker -l warn -Q slow_tasks --concurrency=10

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question