1
0
镜像自地址 https://github.com/tuna/tunasync.git 已同步 2025-12-06 06:26:46 +00:00

refactor(worker): use Run instead of Start and Wait

这个提交包含在:
bigeagle
2016-04-24 23:21:03 +08:00
父节点 a6e8e9e2d9
当前提交 9339fba074
共有 6 个文件被更改,包括 58 次插入36 次删除

查看文件

@@ -103,18 +103,11 @@ func (m *mirrorJob) Run(managerChan chan<- jobMessage, semaphore chan empty) err
// start syncing
managerChan <- jobMessage{tunasync.Syncing, m.Name(), ""}
err = provider.Start()
if err != nil {
logger.Error(
"failed to start syncing job for %s: %s",
m.Name(), err.Error(),
)
return err
}
var syncErr error
syncDone := make(chan error, 1)
go func() {
err := provider.Wait()
err := provider.Run()
if !stopASAP {
syncDone <- err
}