refactor: remove Gorse integration and implement HotRank feature
Some checks failed
Build Backend / build-docker (push) Has been cancelled
Build Backend / build (push) Has been cancelled

- Removed Gorse-related configurations, handlers, and dependencies from the codebase.
- Introduced HotRank feature with configuration options for ranking posts based on recent activity.
- Updated application structure to support HotRank processing, including new caching mechanisms and database interactions.
- Cleaned up related DTOs and repository methods to reflect the removal of Gorse and the addition of HotRank functionality.
This commit is contained in:
lafay
2026-03-24 05:18:30 +08:00
parent b41567a39a
commit 176cd20847
32 changed files with 735 additions and 1128 deletions

View File

@@ -64,6 +64,15 @@ cache:
unread_count_ttl: 30
group_members_ttl: 120
# 热门榜:定时在「候选池」上重算,只写入 Redis ZSETTopN+ top_ids供本地缓存不写数据库
hot_rank:
enabled: true
refresh_interval_seconds: 300
top_n: 100
recent_window_hours: 168 # 7 天内新帖进入候选
recent_fetch_limit: 500
candidate_cap: 800 # 上届 Top + 新帖 ID 合并后上限
# S3对象存储配置
# 环境变量: APP_S3_ENDPOINT, APP_S3_ACCESS_KEY, APP_S3_SECRET_KEY, APP_S3_BUCKET, APP_S3_DOMAIN
s3:
@@ -153,18 +162,6 @@ audit:
baidu_api_key: ""
baidu_secret_key: ""
# Gorse推荐系统配置
# 环境变量: APP_GORSE_ADDRESS, APP_GORSE_API_KEY, APP_GORSE_DASHBOARD, APP_GORSE_IMPORT_PASSWORD
gorse:
enabled: true
address: "http://111.170.19.33:8088" # Gorse server地址
api_key: "" # API密钥
dashboard: "" # Gorse dashboard地址
import_password: "lanyimin123" # 导入数据密码
embedding_api_key: "sk-ZPN5NMPSqEaOGCPfD2LqndZ5Wwmw3DC4CQgzgKhM35fI3RpD"
embedding_url: "https://api.littlelan.cn/v1/embeddings"
embedding_model: "BAAI/bge-m3"
# OpenAI兼容接口配置用于帖子审核支持图文
# 环境变量:
# APP_OPENAI_ENABLED, APP_OPENAI_BASE_URL, APP_OPENAI_API_KEY