MCPcopy
hub / github.com/tuna/tunasync / Run

Method Run

worker/rsync_provider.go:132–151  ·  view source on GitHub ↗
(started chan empty)

Source from the content-addressed store, hash-verified

130}
131
132func (p *rsyncProvider) Run(started chan empty) error {
133 p.dataSize = ""
134 defer p.closeLogFile()
135 if err := p.Start(); err != nil {
136 return err
137 }
138 started <- empty{}
139 if err := p.Wait(); err != nil {
140 code, msg := internal.TranslateRsyncErrorCode(err)
141 if code != 0 {
142 logger.Debugf("Rsync exitcode %d (%s)", code, msg)
143 if p.logFileFd != nil {
144 p.logFileFd.WriteString(msg + "\n")
145 }
146 }
147 return err
148 }
149 p.dataSize = internal.ExtractSizeFromRsyncLog(p.LogFile())
150 return nil
151}
152
153func (p *rsyncProvider) Start() error {
154 p.Lock()

Callers

nothing calls this directly

Calls 7

StartMethod · 0.95
TranslateRsyncErrorCodeFunction · 0.92
ExtractSizeFromRsyncLogFunction · 0.92
closeLogFileMethod · 0.80
DebugfMethod · 0.80
WaitMethod · 0.65
LogFileMethod · 0.65

Tested by

no test coverage detected