Added example tasks and settings to examples/django/demoproject

This commit is contained in:
Ask Solem 2010-03-30 17:09:05 +02:00
Родитель d18ba88f5e
Коммит ad50ad3e66
2 изменённых файлов: 15 добавлений и 3 удалений

Просмотреть файл

@ -0,0 +1,6 @@
from celery.decorators import task
@task
def add(x, y):
return x + y

Просмотреть файл

@ -7,11 +7,17 @@ ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
CELERY_RESULT_BACKEND = "database"
BROKER_HOST = "localhost"
BROKER_PORT = 5672
BROKER_USER = "guest"
BROKER_PASSWORD = "guest"
BROKER_VHOST = "/"
MANAGERS = ADMINS
DATABASE_ENGINE = '' # 'postgresql_psycopg2', 'postgresql', 'mysql',
# 'sqlite3' or 'oracle'.
DATABASE_NAME = '' # Or path to database file if using sqlite3.
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = 'testdb.sqlite'
DATABASE_USER = '' # Not used with sqlite3.
DATABASE_PASSWORD = '' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost.