feat(core): 实现 Celery任务异步生成笔记

- 新增 Celery 配置文件 celery_app.py
- 创建 note_tasks.py 文件,定义生成笔记的 Celery 任务
- 修改 note_router,使用 Celery 任务异步处理笔记生成
- 重构 bili_downloader 和 youtube_downloader,支持多质量选择和错误处理
- 更新 .env.example,添加 Celery 配置项
This commit is contained in:
思诺特
2025-04-15 12:19:14 +08:00
parent a395f8e1c1
commit 3784e15670
8 changed files with 165 additions and 47 deletions

View File

@@ -1,7 +1,17 @@
###
# @Author: 思诺特 jefferyhcool@gmail.com
# @Date: 2025-04-14 08:49:59
# @LastEditors: 思诺特 jefferyhcool@gmail.com
# @LastEditTime: 2025-04-15 12:18:39
# @FilePath: \BiliNote\.env.example
# @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
###
# 通用端口配置
BACKEND_PORT=8001
FRONTEND_PORT=3015
BACKEND_HOST=0.0.0.0
CELERY_BROKER_URL= #redis 地址
CELERY_RESULT_BACKEND= #redis 地址
# 前端访问后端用(生产环境建议写公网或宿主机 IP
VITE_API_BASE_URL=http://127.0.0.1:8001