- 在knowledge/apps.py的ready()方法中注册Celery任务 - 移除ops/__init__.py中的直接导入,避免循环依赖 - 简化tasks/__init__.py,使用延迟导入 - 解决"Apps aren't loaded yet"错误 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
5 lines
176 B
Python
5 lines
176 B
Python
# coding=utf-8
|
|
|
|
# Import tasks for Celery discovery
|
|
# Note: We use lazy imports to avoid Django app loading issues
|
|
# Tasks will be imported when needed by Celery's autodiscover |