fix: genScripts 草稿幂等——存在且非 --force 跳过,防覆盖人工精修
This commit is contained in:
@@ -70,6 +70,9 @@ func genScripts(fl genFlags) {
|
||||
sem := make(chan struct{}, 2)
|
||||
var wg sync.WaitGroup
|
||||
for _, r := range rows {
|
||||
if !fl.force && fileExists(scriptPath(r["level_id"].Int64(), r["id"].Int64())) {
|
||||
continue // 幂等:草稿已存在跳过(--force 覆盖;防重跑覆盖人工精修草稿)
|
||||
}
|
||||
wg.Add(1)
|
||||
sem <- struct{}{}
|
||||
go func(r gdb.Record) {
|
||||
|
||||
Reference in New Issue
Block a user