Initial commit: clean project structure
- Backend: FastAPI + SQLAlchemy + Celery (Python 3.11+) - Frontend: Vue 3 + TypeScript + Pinia + Tailwind - Admin Frontend: separate Vue 3 app for management - Docker Compose: 9 services orchestration - Specs: design prototypes, memory system PRD, product roadmap Cleanup performed: - Removed temporary debug scripts from backend root - Removed deprecated admin_app.py (embedded UI) - Removed duplicate docs from admin-frontend - Updated .gitignore for Vite cache and egg-info
This commit is contained in:
33
backend/app/core/celery_app.py
Normal file
33
backend/app/core/celery_app.py
Normal file
@@ -0,0 +1,33 @@
|
||||
"""Celery application setup."""
|
||||
|
||||
from celery import Celery
|
||||
from celery.schedules import crontab
|
||||
|
||||
from app.core.config import settings
|
||||
|
||||
celery_app = Celery(
|
||||
"dreamweaver",
|
||||
broker=settings.celery_broker_url,
|
||||
backend=settings.celery_result_backend,
|
||||
)
|
||||
|
||||
celery_app.conf.update(
|
||||
task_track_started=True,
|
||||
task_serializer="json",
|
||||
accept_content=["json"],
|
||||
result_serializer="json",
|
||||
timezone="Asia/Shanghai",
|
||||
enable_utc=True,
|
||||
beat_schedule={
|
||||
"check_push_notifications": {
|
||||
"task": "app.tasks.push_notifications.check_push_notifications",
|
||||
"schedule": crontab(minute="*/15"),
|
||||
},
|
||||
"prune_expired_memories": {
|
||||
"task": "app.tasks.memory.prune_memories_task",
|
||||
"schedule": crontab(minute="0", hour="3"), # Daily at 03:00
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
celery_app.autodiscover_tasks(["app.tasks"])
|
||||
Reference in New Issue
Block a user