profile: analyze all groups concurrently

This commit is contained in:
2026-08-03 15:38:28 +08:00
parent 2ba5752494
commit b96b732b92
5 changed files with 105 additions and 12 deletions
@@ -32,6 +32,14 @@ object UserProfileAnalysisService {
return report
}
suspend fun listHistoryGroupIds(): List<Long> {
check(PluginConfig.profileEnabled) { "历史用户画像分析未启用" }
check(UserProfileStore.isAvailable) { "用户画像数据库不可用" }
return withContext(Dispatchers.IO) {
ProfileHistoryReader(resolveHistoryFile()).listGroupIds()
}
}
suspend fun analyze(
userId: Long,
maxBatches: Int,