realeas zhushi

master
zhangshunping 5 years ago
parent 335aff4cd4
commit 666955ce53

@ -4,6 +4,7 @@ import (
"bytes"
"fmt"
"objectss/database"
"objectss/utils"
"os/exec"
"sync"
)
@ -33,14 +34,14 @@ func Consumer(channel chan string, dbw *database.DbWorker, wg *sync.WaitGroup, o
copyExec := fmt.Sprintf("obsutil sync %s %s", path, ossPath)
fmt.Println("shell:", copyExec)
//s, err := Exec_linux_shell(copyExec)
//utils.Log.Info("copy exec_shell: ", s, " err", err)
//// 拷贝完成后,更新数据 oss=1
//if err == nil {
// dbw.UpdateRepositoryOssbyPath(path)
//} else {
// utils.Log.Errorf("objectStore upload Failedcommad %s Git Path %s:shell exec return %", copyExec, pathDir, s, " err", err)
//}
s, err := Exec_linux_shell(copyExec)
utils.Log.Info("copy exec_shell: ", s, " err", err)
// 拷贝完成后,更新数据 oss=1
if err == nil {
dbw.UpdateRepositoryOssbyPath(path)
} else {
utils.Log.Errorf("objectStore upload Failedcommad %s Git Path %s:shell exec return %", copyExec, pathDir, s, " err", err)
}
}
mu.Lock()

Loading…
Cancel
Save