added celery and tasks but most important added tag_list
This commit is contained in:
+14
-2
@@ -13,6 +13,7 @@ https://docs.djangoproject.com/en/2.0/ref/settings/
|
||||
import os
|
||||
import re
|
||||
import socket
|
||||
import djcelery
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
@@ -46,6 +47,8 @@ INSTALLED_APPS = [
|
||||
'application',
|
||||
'taggit',
|
||||
'taggit_templatetags2',
|
||||
'djcelery',
|
||||
'kombu.transport.django',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
@@ -171,7 +174,7 @@ else:
|
||||
]
|
||||
print(" --- Live stage --- ")
|
||||
|
||||
|
||||
AUTH_PROFILE_MODULE = 'application.CustomUser'
|
||||
|
||||
#Log Configuration
|
||||
LOGGING = {
|
||||
@@ -249,4 +252,13 @@ if DEBUG:
|
||||
|
||||
DEBUG_TOOLBAR_CONFIG = {
|
||||
'INTERCEPT_REDIRECTS': False,
|
||||
}
|
||||
}
|
||||
|
||||
# Celery settings
|
||||
BROKER_URL = 'django://'
|
||||
CELERY_ACCEPT_CONTENT = ['json']
|
||||
CELERY_TASK_SERIALIZER = 'json'
|
||||
CELERY_RESULT_SERIALIZER = 'json'
|
||||
CELERY_RESULT_BACKEND = 'djcelery.backends.database:DatabaseBackend'
|
||||
CELERYBEAT_SCHEDULER = "djcelery.schedulers.DatabaseScheduler"
|
||||
djcelery.setup_loader()
|
||||
Reference in New Issue
Block a user