MCPcopy
hub / github.com/syncthing/syncthing / Done

Method Done

lib/model/queue.go:70–81  ·  view source on GitHub ↗
(file string)

Source from the content-addressed store, hash-verified

68}
69
70func (q *jobQueue) Done(file string) {
71 q.mut.Lock()
72 defer q.mut.Unlock()
73
74 for i := range q.progress {
75 if q.progress[i] == file {
76 copy(q.progress[i:], q.progress[i+1:])
77 q.progress = q.progress[:len(q.progress)-1]
78 return
79 }
80 }
81}
82
83// Jobs returns a paginated list of file currently being pulled and files queued
84// to be pulled. It also returns how many items were skipped.

Callers 15

TakeWithContextMethod · 0.80
takeInnerMethod · 0.80
ServeMethod · 0.80
verifyExistingLockedMethod · 0.80
acquireNewLockedMethod · 0.80
tryNATDeviceMethod · 0.80
discoverAllFunction · 0.80
StartMethod · 0.80
IndexMethod · 0.80
IndexUpdateMethod · 0.80
RequestMethod · 0.80
sendMethod · 0.80

Calls 1

UnlockMethod · 0.80

Tested by 13

TestRecvOnlyRevertOwnIDFunction · 0.64
TestCopyOwnerFunction · 0.64
TestJobQueueFunction · 0.64
ServeMethod · 0.64
TestWatchWinRootFunction · 0.64
expectErrorForPathFunction · 0.64
testScenarioFunction · 0.64
testWatchOutputFunction · 0.64