mirror of
https://github.com/wahyd4/links.git
synced 2026-08-09 05:06:16 +10:00
15 lines
359 B
Python
15 lines
359 B
Python
import os
|
|
from celery import Celery
|
|
from django.conf import settings
|
|
|
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings')
|
|
|
|
app = Celery('core')
|
|
app.config_from_object('django.conf:settings', namespace='CELERY')
|
|
app.autodiscover_tasks()
|
|
|
|
# Optional: For debugging
|
|
@app.task(bind=True)
|
|
def debug_task(self):
|
|
print(f'Request: {self.request!r}')
|