- 后端: file_start 事件改为在获取信号量之后发送,避免并发时所有文件同时'开始'导致进度瞬间跳到90% - 前端: 进度追踪改为基于 file_end 事件(完成)而非 file_start(开始),进度条平滑反映实际审查进度
This commit is contained in:
+1
-1
@@ -134,7 +134,7 @@ func GenerateReview(db *sql.DB, repoPath, base, head string, topN, concurrency i
|
||||
sem <- struct{}{} // acquire slot
|
||||
defer func() { <-sem }() // release slot
|
||||
|
||||
// Send file_start (order doesn't matter, frontend tracks by filename)
|
||||
// Send file_start after acquiring semaphore — this means the file is actually being reviewed now
|
||||
if safeCallback != nil {
|
||||
safeCallback("file_start", map[string]interface{}{
|
||||
"file": f.Filename,
|
||||
|
||||
Reference in New Issue
Block a user