From 666955ce53285da05b22eff5c196e23424c76c12 Mon Sep 17 00:00:00 2001 From: zhangshunping <392956784@qq.com> Date: Tue, 21 Jul 2020 15:49:02 +0800 Subject: [PATCH] realeas zhushi --- handler/ProducerAndComsumer.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/handler/ProducerAndComsumer.go b/handler/ProducerAndComsumer.go index 1c4490e..6d7a867 100755 --- a/handler/ProducerAndComsumer.go +++ b/handler/ProducerAndComsumer.go @@ -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 Failed:commad %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 Failed:commad %s :Git Path %s:shell exec return %", copyExec, pathDir, s, " err", err) + } } mu.Lock()