Added example tasks and settings to examples/django/demoproject
This commit is contained in:
Родитель
d18ba88f5e
Коммит
ad50ad3e66
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче