1 3
from __future__ import absolute_import, unicode_literals
2 3
import os
3 3
from celery import Celery
4

5

6 3
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cyborgbackup.settings')
7

8 3
app = Celery('cyborgbackup')
9

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

12 3
app.autodiscover_tasks()
13

14

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

Read our documentation on viewing source code .

Loading