1 ##############################################################################
2 # Copyright (c) 2016 Max Breitenfeldt and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
13 from celery import Celery
15 # set the default Django settings module for the 'celery' program.
16 os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'laas_dashboard.settings')
18 from django.conf import settings # noqa
20 app = Celery('laas_dashboard')
22 # Using a string here means the worker will not have to
23 # pickle the object when using Windows.
24 app.config_from_object('django.conf:settings')
25 app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
26 app.config_from_object('django.conf:settings', namespace='CELERY')
31 print('Request: {0!r}'.format(self.request))