from __future__ import absolute_import
from __future__ import print_function
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'wikum.settings')

from django.conf import settings
from celery import Celery

app = Celery('website')

app.config_from_object('django.conf:settings', namespace='CELERY')

# For autodiscover_tasks to work, you must define your tasks in a file called 'tasks.py'.
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)

@app.task(bind=True)
def debug_task(self):
    print('Request: {0!r}'.format(self.request))
