prije gemini provjere
This commit is contained in:
14
001.BACKEND/core/celery.py
Normal file
14
001.BACKEND/core/celery.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# core/celery.py
|
||||
import os
|
||||
from celery import Celery # 🚀 Ovdje uvoziš čistu Celery klasu
|
||||
|
||||
# Postavljamo zadani Django settings modul za 'celery' program.
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings')
|
||||
|
||||
app = Celery('core')
|
||||
|
||||
# Sve postavke vezane za Celery imaju 'CELERY_' prefiks u settings.py
|
||||
app.config_from_object('django.conf:settings', namespace='CELERY')
|
||||
|
||||
# Automatski učitaj tasks.py iz svih registriranih Django aplikacija
|
||||
app.autodiscover_tasks()
|
||||
Reference in New Issue
Block a user