mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Fixing celery issues.
This commit is contained in:
parent
e19972fd0d
commit
c3732d6d1c
4 changed files with 10 additions and 4 deletions
|
@ -2,7 +2,7 @@ anyjson==0.3.3
|
|||
bleach==3.2.1
|
||||
beautifulsoup4==4.9.3
|
||||
boto==2.49.0
|
||||
celery>=4.0,<5
|
||||
celery>=5,<6
|
||||
chardet==3.0.4
|
||||
cssutils==1.0.2
|
||||
django-compress==1.0.1
|
||||
|
|
|
@ -2,11 +2,11 @@ from __future__ import absolute_import, unicode_literals
|
|||
|
||||
# This will make sure the app is always imported when
|
||||
# Django starts so that shared_task will use this app.
|
||||
from .celeryapp import app as celery_app
|
||||
from .celery import app as celery_app
|
||||
|
||||
__all__ = ['celery_app']
|
||||
|
||||
import pymysql
|
||||
|
||||
pymysql.install_as_MySQLdb()
|
||||
pymysql.version_info = (1, 3, 13, "final", 0)
|
||||
pymysql.version_info = (1, 3, 13, "final", 0)
|
||||
|
|
|
@ -11,7 +11,7 @@ app = Celery('newsblur')
|
|||
# the configuration object to child processes.
|
||||
# - namespace='CELERY' means all celery-related configuration keys
|
||||
# should have a `CELERY_` prefix.
|
||||
app.config_from_object('django.conf:settings')
|
||||
app.config_from_object('django.conf:settings', namespace="CELERY")
|
||||
|
||||
# Load task modules from all registered Django app configs.
|
||||
app.autodiscover_tasks(lambda: [n.name for n in apps.get_app_configs()])
|
||||
|
|
|
@ -708,6 +708,12 @@ CELERY_REDIS_DB_NUM = 4
|
|||
SESSION_REDIS_DB = 5
|
||||
CELERY_BROKER_URL = "redis://%s:%s/%s" % (REDIS['host'], REDIS_PORT,CELERY_REDIS_DB_NUM)
|
||||
CELERY_RESULT_BACKEND = CELERY_BROKER_URL
|
||||
BROKER_TRANSPORT_OPTIONS = {
|
||||
"max_retries": 3,
|
||||
"interval_start": 0,
|
||||
"interval_step": 0.2,
|
||||
"interval_max": 0.5
|
||||
}
|
||||
|
||||
SESSION_REDIS = {
|
||||
'host': REDIS_SESSIONS['host'],
|
||||
|
|
Loading…
Add table
Reference in a new issue