mirror of
https://github.com/rjNemo/villafleurie
synced 2026-06-12 13:26:47 +00:00
* crete setting module to split prod and dev configs * fix calendar midmatch * lint imports using isort * doc: add doctrings
20 lines
530 B
Python
20 lines
530 B
Python
""" Celery is a distributed task queue used for real-time processing of
|
|
asynchronous actions
|
|
"""
|
|
|
|
from __future__ import absolute_import, unicode_literals
|
|
|
|
import os
|
|
|
|
from celery import Celery
|
|
|
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'villafleurie.settings')
|
|
app = Celery('villafleurie')
|
|
app.config_from_object('django.conf:settings', namespace='CELERY')
|
|
app.autodiscover_tasks()
|
|
|
|
|
|
@app.task(bind=True)
|
|
def debug_task(self):
|
|
""" Print request. For debug purposes only. """
|
|
print(f'Request: {self.request!r}')
|