Skip to content

Commit

Permalink
- Fix celery initialization when using GeoNode ad a depenency
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Jun 27, 2018
1 parent 5af2590 commit a74a0dd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
7 changes: 5 additions & 2 deletions geonode/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@
def run_setup_hooks(*args, **kwargs):
from django.conf import settings
from .celery_app import app as celery_app
if 'celery_app' not in settings.INSTALLED_APPS:
settings.INSTALLED_APPS += (celery_app, )
if 'geonode.celery_app' not in settings.INSTALLED_APPS:
settings.INSTALLED_APPS += ('geonode.celery_app', )
if settings.USE_GEOSERVER and settings.ASYNC_SIGNALS:
from geonode.messaging.queues import QUEUES
settings.CELERY_TASK_QUEUES += QUEUES


class AppConfig(BaseAppConfig):
Expand Down
10 changes: 5 additions & 5 deletions geonode/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1302,8 +1302,8 @@

# I use these to debug kombu crashes; we get a more informative message.
CELERY_TASK_SERIALIZER = 'json'
#CELERY_RESULT_SERIALIZER = 'json'
CELERY_ACCEPT_CONTENT = ['json', 'pickle']
CELERY_RESULT_SERIALIZER = 'json'
CELERY_ACCEPT_CONTENT = ['json']

# Set Tasks Queues
# CELERY_TASK_DEFAULT_QUEUE = "default"
Expand All @@ -1321,9 +1321,9 @@
Queue('email', GEONODE_EXCHANGE, routing_key='email'),
)

if USE_GEOSERVER and ASYNC_SIGNALS:
from geonode.messaging.queues import QUEUES
CELERY_TASK_QUEUES += QUEUES
# if USE_GEOSERVER and ASYNC_SIGNALS:
# from geonode.messaging.queues import QUEUES
# CELERY_TASK_QUEUES += QUEUES

# CELERYBEAT_SCHEDULE = {
# ...
Expand Down

0 comments on commit a74a0dd

Please sign in to comment.