maxkb/apps/ops/__init__.py
朱潮 dea3454011 修复Django应用启动时的导入错误
- 在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>
2025-08-31 01:25:16 +08:00

13 lines
296 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# coding=utf-8
"""
@project: MaxKB
@Author
@file __init__.py.py
@date2024/8/16 14:47
@desc:
"""
from .celery import app as celery_app
# 任务注册现在通过knowledge/apps.py的ready()方法处理
# 这样可以避免Django应用未准备好时的导入问题