feat(brand): 品牌检测任务统一轮询驱动并展示行级实时进度

任务面板状态改为独立轮询(getTaskPollIntervalMs 节奏),刷新/提交/取消/删除后
按是否有运行中任务自动续轮询或停表;运行中任务通过详情接口拉取 Redis 行级进度,
进度按"已处理品牌行/总行(含查询失败)"推进并展示 crawling/assembling/uploading 阶段文案
This commit is contained in:
2026-09-08 22:52:49 +08:00
parent 3f599547e6
commit 5fad0ae027
2 changed files with 128 additions and 22 deletions
@@ -45,9 +45,28 @@ export interface BrandTaskListResponse {
error?: string
}
/** Java 详情接口返回的行级进度(Redis 实时进度,每提交一个分片推进 current_line */
export interface BrandLineProgressInfo {
file_index?: number
file_total?: number
file_name?: string
/** 已处理行/品牌数 */
current_line?: number
/** 总行/品牌数 */
total_lines?: number
/** crawling / assembling / uploading / failed */
phase?: string
}
export interface BrandLineProgress {
has_progress?: boolean
info?: BrandLineProgressInfo
}
export interface BrandTaskDetailResponse {
success: boolean
task?: BrandTaskItem
line_progress?: BrandLineProgress
error?: string
}