}
BROKER_URL = env('BROKER_URL')
-
CELERY_IMPORTS = ("timeside.server.tasks",)
CELERY_RESULT_BACKEND = 'djcelery.backends.database:DatabaseBackend'
CELERY_TASK_SERIALIZER = 'json'
'default': {
#'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
'ENGINE': 'telemeta.util.backend.CustomElasticEngine',
- 'URL': 'http://search:9200/',
- 'INDEX_NAME': 'haystack',
+ 'URL': env('HAYSTACK_URL'),
+ 'INDEX_NAME': env('HAYSTACK_INDEX_NAME'),
'INLUDE_SPELLING': True,
'EXCLUDED_INDEXES': ['telemeta.search_indexes.LocationIndex',
'telemeta.search_indexes.LocationAliasIndex',
'autocomplete': {
# 'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
'ENGINE': 'telemeta.util.backend.CustomElasticEngine',
- 'URL': 'http://search:9200/',
- 'INDEX_NAME': 'haystackauto',
+ 'URL': env('HAYSTACK_URL'),
+ 'INDEX_NAME': env('HAYSTACK_INDEX_NAME_AUTOCOMPLETE'),
'INLUDE_SPELLING': True,
'EXCLUDED_INDEXES': ['telemeta.search_indexes.MediaItemIndex',
'telemeta.search_indexes.MediaCollectionIndex',
]
},
}
+
#HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor'
HAYSTACK_SIGNAL_PROCESSOR = 'telemeta.util.search_signals.RealTimeCustomSignal'
HAYSTACK_SEARCH_RESULTS_PER_PAGE = 50
-# -- MYSQL DATABASE
+## MYSQL DATABASE
ENGINE=django.db.backends.mysql
MYSQL_ROOT_PASSWORD=mysecretpassword
MYSQL_USER=telemeta
MYSQL_PASSWORD=mysecretpassword
-# -- DJANGO
+## DJANGO
DEBUG=True
-
SECRET_KEY=ghv8us2587n97dq&w$c((o5rj_$-9#d-8j#57y_a9og8wux1h7
+## CELERY
+
# replace broker by localhost if you start your app outside docker-compose
BROKER_URL=redis://broker:6379/0
-# If this is True, all tasks will be executed locally by blocking until the task returns.
+# if this is True, all tasks will be executed locally by blocking until the task returns.
CELERY_ALWAYS_EAGER=False
-REINDEX=True
+## HAYSTACK
+
+# if this is True, the search index will be rebuild
+REINDEX=False
+
+HAYSTACK_URL=http://search:9200/
+
+# change index names if hosting multiple search containers
+HAYSTACK_INDEX_NAME=telemeta
+HAYSTACK_INDEX_NAME_AUTOCOMPLETE=telemeta_auto
+++ /dev/null
-REINDEX=False
-# -- MYSQL DATABASE
+## MYSQL DATABASE
ENGINE=django.db.backends.mysql
MYSQL_ROOT_PASSWORD=mysecretpassword
MYSQL_USER=telemeta
MYSQL_PASSWORD=mysecretpassword
-# -- DJANGO
+## DJANGO
DEBUG=False
-
SECRET_KEY=ghv8us2587n97dq&w$c((o5rj_$-9#d-8j#57y_a9og8wux1h7
+## CELERY
+
# replace broker by localhost if you start your app outside docker-compose
BROKER_URL=redis://broker:6379/0
-# If this is True, all tasks will be executed locally by blocking until the task returns.
+# if this is True, all tasks will be executed locally by blocking until the task returns.
CELERY_ALWAYS_EAGER=False
+
+## HAYSTACK
+
+# if this is True, the search index will be rebuild
+REINDEX=False
+
+HAYSTACK_URL=http://search:9200/
+
+# change index names if hosting multiple search containers
+HAYSTACK_INDEX_NAME=telemeta
+HAYSTACK_INDEX_NAME_AUTOCOMPLETE=telemeta_auto