()
| 316 | } |
| 317 | |
| 318 | func (sh *SyncHandler) currentStatus() syncStatus { |
| 319 | sh.mu.Lock() |
| 320 | defer sh.mu.Unlock() |
| 321 | ago := 0 |
| 322 | if !sh.recentCopyTime.IsZero() { |
| 323 | ago = int(time.Since(sh.recentCopyTime) / time.Second) |
| 324 | } |
| 325 | return syncStatus{ |
| 326 | sh: sh, |
| 327 | From: sh.fromName, |
| 328 | FromDesc: storageDesc(sh.from), |
| 329 | To: sh.toName, |
| 330 | ToDesc: storageDesc(sh.to), |
| 331 | DestIsIndex: sh.toIndex, |
| 332 | BlobsToCopy: len(sh.needCopy), |
| 333 | BytesToCopy: sh.bytesRemain, |
| 334 | LastCopySecAgo: ago, |
| 335 | } |
| 336 | } |
| 337 | |
| 338 | // readQueueToMemory slurps in the pending queue from disk (or |
| 339 | // wherever) to memory. Even with millions of blobs, it's not much |
nothing calls this directly
no test coverage detected