Debian Codegraph @

tq/transfer_queue.go

raw symbols SCIP
1 package tqscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/
2
3 import (
4 "fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/"
5 "osscip-go gomod github.com/golang/go/src go1.25.0 os/"
6 "sortscip-go gomod github.com/golang/go/src go1.25.0 sort/"
7 "syncscip-go gomod github.com/golang/go/src go1.25.0 sync/"
8 "timescip-go gomod github.com/golang/go/src go1.25.0 time/"
9
10 "github.com/git-lfs/git-lfs/v3/errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/"
11 "github.com/git-lfs/git-lfs/v3/gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/"
12 "github.com/git-lfs/git-lfs/v3/lfshttpscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/"
13 "github.com/git-lfs/git-lfs/v3/toolsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/"
14 "github.com/git-lfs/git-lfs/v3/trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/"
15 "github.com/rubyist/tracerxscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/"
16 )
17
18 const (
19 defaultBatchSizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/defaultBatchSize. = 100
20 baseRetryDelayMsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/baseRetryDelayMs. = 250
21 )
22
23 type retryCounterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter# struct {
24 MaxRetriesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#MaxRetries. int
25 MaxRetryDelayscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#MaxRetryDelay. int
26
27 // cmu guards count
28 cmuscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#cmu. syncscip-go gomod github.com/golang/go/src go1.25.0 sync/.Mutexscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#
29 // count maps OIDs to number of retry attempts
30 countscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#count. map[string]int
31 }
32
33 // newRetryCounter instantiates a new *retryCounter.
34 func newRetryCounterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/newRetryCounter().() *retryCounterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter# {
35 return &retryCounterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#{
36 MaxRetriesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#MaxRetries.: defaultMaxRetriesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/defaultMaxRetries.,
37 MaxRetryDelayscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#MaxRetryDelay.: defaultMaxRetryDelayscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/defaultMaxRetryDelay.,
38 countscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#count.: make(map[string]int),
39 }
40 }
41
42 // Increment increments the number of retries for a given OID and returns the
43 // new value. It is safe to call across multiple goroutines.
44 func (r *retryCounterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#) Incrementscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#Increment().(oid string) int {
45 r.cmuscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#cmu..Lockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Lock().()
46 defer r.cmuscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#cmu..Unlockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Unlock().()
47
48 r.countscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#count.[oid]++
49 return r.countscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#count.[oid]
50 }
51
52 // CountFor returns the current number of retries for a given OID. It is safe to
53 // call across multiple goroutines.
54 func (r *retryCounterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#) CountForscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#CountFor().(oid string) int {
55 r.cmuscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#cmu..Lockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Lock().()
56 defer r.cmuscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#cmu..Unlockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Unlock().()
57
58 return r.countscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#count.[oid]
59 }
60
61 // CanRetry returns the current number of retries, and whether or not it exceeds
62 // the maximum number of retries (see: retryCounter.MaxRetries).
63 func (r *retryCounterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#) CanRetryscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#CanRetry().(oid string) (int, bool) {
64 count := r.CountForscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#CountFor().(oid)
65 return count, count < r.MaxRetriesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#MaxRetries.
66 }
67
68 // ReadyTime returns the time from now when the current retry can occur or the
69 // zero time if the retry can occur immediately.
70 func (r *retryCounterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#) ReadyTimescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#ReadyTime().(oid string) timescip-go gomod github.com/golang/go/src go1.25.0 time/.Timescip-go gomod github.com/golang/go/src go1.25.0 time/Time# {
71 count := r.CountForscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#CountFor().(oid)
72 if count < 1 {
73 return timescip-go gomod github.com/golang/go/src go1.25.0 time/.Timescip-go gomod github.com/golang/go/src go1.25.0 time/Time#{}
74 }
75
76 maxDelayMs := 1000 * uint64(r.MaxRetryDelayscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#MaxRetryDelay.)
77 delay := uint64(baseRetryDelayMsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/baseRetryDelayMs.) * (1 << uint(count-1))
78 if delay == 0 || delay > maxDelayMs {
79 delay = maxDelayMs
80 }
81 return timescip-go gomod github.com/golang/go/src go1.25.0 time/.Nowscip-go gomod github.com/golang/go/src go1.25.0 time/Now().().Addscip-go gomod github.com/golang/go/src go1.25.0 time/Time#Add().(timescip-go gomod github.com/golang/go/src go1.25.0 time/.Durationscip-go gomod github.com/golang/go/src go1.25.0 time/Duration#(delay) * timescip-go gomod github.com/golang/go/src go1.25.0 time/.Millisecondscip-go gomod github.com/golang/go/src go1.25.0 time/Millisecond.)
82 }
83
84 // batch implements the sort.Interface interface and enables sorting on a slice
85 // of `*Transfer`s by object size.
86 //
87 // This interface is implemented here so that the largest objects can be
88 // processed first. Since adding a new batch is unable to occur until the
89 // current batch has finished processing, this enables us to reduce the risk of
90 // a single worker getting tied up on a large item at the end of a batch while
91 // all other workers are sitting idle.
92 type batchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch# []*objectTuplescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#
93
94 // Concat concatenates two batches together, returning a single, clamped batch as
95 // "left", and the remainder of elements as "right". If the union of the
96 // receiver and "other" has cardinality less than "size", "right" will be
97 // returned as nil. Any object tuple that is not currently able to be retried
98 // (ie Retry-After response), will also go into the right batch. Also, when object(s)
99 // are returned that are rate-limited, return the minimum duration required to wait until
100 // a object is ready.
101 func (b batchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch#) Concatscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch#Concat().(other batchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch#, size int) (left, right batchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch#, minWait timescip-go gomod github.com/golang/go/src go1.25.0 time/.Durationscip-go gomod github.com/golang/go/src go1.25.0 time/Duration#) {
102 u := batchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch#(append(b, other...))
103 for _, ot := range u {
104 if timescip-go gomod github.com/golang/go/src go1.25.0 time/.Nowscip-go gomod github.com/golang/go/src go1.25.0 time/Now().().Afterscip-go gomod github.com/golang/go/src go1.25.0 time/Time#After().(ot.ReadyTimescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#ReadyTime.) {
105 // The current time is past the time the object should
106 // be available.
107 left = append(left, ot)
108 } else {
109 // The time hasn't passed for the object.
110 right = append(right, ot)
111 wait := timescip-go gomod github.com/golang/go/src go1.25.0 time/.Untilscip-go gomod github.com/golang/go/src go1.25.0 time/Until().(ot.ReadyTimescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#ReadyTime.)
112 if minWait == 0 {
113 minWait = wait
114 } else if wait < minWait {
115 minWait = wait
116 }
117 }
118 }
119 if len(left) <= size {
120 // If the size of left fits the given size limit, return with no adjustments.
121 return left, right, minWait
122 }
123 // If left is too large, trip left up to size and append the rest to right.
124 right = append(right, left[size:]...)
125 left = left[:size]
126 return left, right, minWait
127 }
128
129 func (b batchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch#) ToTransfersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch#ToTransfers().() []*Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer# {
130 transfers := make([]*Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#, 0, len(b))
131 for _, t := range b {
132 transfers = append(transfers, &Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#{Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Oid.: t.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Oid., Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Size.: t.Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Size.})
133 }
134 return transfers
135 }
136
137 func (b batchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch#) Lenscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch#Len().() int { return len(b) }
138 func (b batchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch#) Lessscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch#Less().(i, j int) bool { return b[i].Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Size. < b[j].Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Size. }
139 func (b batchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch#) Swapscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch#Swap().(i, j int) { b[i], b[j] = b[j], b[i] }
140
141 type abortableWaitGroupscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup# struct {
142 wqscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#wq. syncscip-go gomod github.com/golang/go/src go1.25.0 sync/.WaitGroupscip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#
143 counterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#counter. int
144 muscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#mu. syncscip-go gomod github.com/golang/go/src go1.25.0 sync/.Mutexscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#
145 abortscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#abort. bool
146 }
147
148 func newAbortableWaitGroupscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/newAbortableWaitGroup().() *abortableWaitGroupscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup# {
149 return &abortableWaitGroupscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#{}
150 }
151
152 func (q *abortableWaitGroupscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#) Addscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#Add().(delta int) {
153 q.muscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#mu..Lockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Lock().()
154 defer q.muscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#mu..Unlockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Unlock().()
155
156 if !q.abortscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#abort. {
157 q.counterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#counter. += delta
158 q.wqscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#wq..Addscip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#Add().(delta)
159 }
160 }
161
162 func (q *abortableWaitGroupscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#) Donescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#Done().() {
163 q.muscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#mu..Lockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Lock().()
164 defer q.muscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#mu..Unlockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Unlock().()
165
166 if !q.abortscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#abort. {
167 q.counterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#counter. -= 1
168 q.wqscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#wq..Donescip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#Done().()
169 }
170 }
171
172 func (q *abortableWaitGroupscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#) Abortscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#Abort().() {
173 q.muscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#mu..Lockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Lock().()
174 defer q.muscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#mu..Unlockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Unlock().()
175
176 q.abortscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#abort. = true
177 q.wqscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#wq..Addscip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#Add().(-q.counterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#counter.)
178 }
179
180 func (q *abortableWaitGroupscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#) Waitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#Wait().() {
181 q.wqscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#wq..Waitscip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#Wait().()
182 }
183
184 // TransferQueue organises the wider process of uploading and downloading,
185 // including calling the API, passing the actual transfer request to transfer
186 // adapters, and dealing with progress, errors and retries.
187 type TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue# struct {
188 directionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#direction. Directionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Direction#
189 clientscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#client. *tqClientscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/tqClient#
190 remotescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#remote. string
191 refscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#ref. *gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.Refscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Ref#
192 adapterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#adapter. Adapterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Adapter#
193 adapterInProgressscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#adapterInProgress. bool
194 adapterInitMutexscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#adapterInitMutex. syncscip-go gomod github.com/golang/go/src go1.25.0 sync/.Mutexscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#
195 dryRunscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#dryRun. bool
196 cbscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#cb. toolsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/.CopyCallbackscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/CopyCallback#
197 meterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#meter. *Meterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Meter#
198 errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errors. []error
199 transfersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#transfers. map[string]*objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#
200 batchSizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#batchSize. int
201 bufferDepthscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#bufferDepth. int
202 incomingscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#incoming. chan *objectTuplescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple# // Channel for processing incoming items
203 errorcscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errorc. chan error // Channel for processing errors
204 watchersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#watchers. []chan *Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#
205 trMutexscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#trMutex. *syncscip-go gomod github.com/golang/go/src go1.25.0 sync/.Mutexscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#
206 collectorWaitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#collectorWait. syncscip-go gomod github.com/golang/go/src go1.25.0 sync/.WaitGroupscip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#
207 errorwaitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errorwait. syncscip-go gomod github.com/golang/go/src go1.25.0 sync/.WaitGroupscip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#
208 // wait is used to keep track of pending transfers. It is incremented
209 // once per unique OID on Add(), and is decremented when that transfer
210 // is marked as completed or failed, but not retried.
211 waitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#wait. *abortableWaitGroupscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#
212 manifestscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#manifest. Manifestscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Manifest#
213 rcscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#rc. *retryCounterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#
214
215 // unsupportedContentType indicates whether the transfer queue ever saw
216 // an HTTP 422 response indicating that their upload destination does
217 // not support Content-Type detection.
218 unsupportedContentTypescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#unsupportedContentType. bool
219 }
220
221 // objects holds a set of objects.
222 type objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects# struct {
223 completedscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#completed. bool
224 objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#objects. []*objectTuplescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#
225 }
226
227 // All returns all *objectTuple's contained in the *objects set.
228 func (s *objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#) Allscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#All().() []*objectTuplescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple# {
229 return s.objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#objects.
230 }
231
232 // Append returns a new *objects with the given *objectTuple(s) appended to the
233 // end of the known objects.
234 func (s *objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#) Appendscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#Append().(os ...*objectTuplescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#) *objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects# {
235 return &objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#{
236 completedscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#completed.: s.completedscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#completed.,
237 objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#objects.: append(s.objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#objects., os...),
238 }
239 }
240
241 // First returns the first *objectTuple in the chain of objects.
242 func (s *objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#) Firstscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#First().() *objectTuplescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple# {
243 if len(s.objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#objects.) == 0 {
244 return nil
245 }
246 return s.objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#objects.[0]
247 }
248
249 type objectTuplescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple# struct {
250 Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Name., Pathscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Path., Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Oid. string
251 Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Size. int64
252 Missingscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Missing. bool
253 ReadyTimescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#ReadyTime. timescip-go gomod github.com/golang/go/src go1.25.0 time/.Timescip-go gomod github.com/golang/go/src go1.25.0 time/Time#
254 retryLaterTimescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#retryLaterTime. timescip-go gomod github.com/golang/go/src go1.25.0 time/.Timescip-go gomod github.com/golang/go/src go1.25.0 time/Time#
255 }
256
257 func (o *objectTuplescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#) ToTransferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#ToTransfer().() *Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer# {
258 return &Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#{
259 Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Name.: o.Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Name.,
260 Pathscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Path.: o.Pathscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Path.,
261 Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Oid.: o.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Oid.,
262 Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Size.: o.Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Size.,
263 Missingscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Missing.: o.Missingscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Missing.,
264 }
265 }
266
267 type Optionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Option# func(*TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#)
268
269 func DryRunscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/DryRun().(dryRun bool) Optionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Option# {
270 return func(tq *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) {
271 tq.dryRunscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#dryRun. = dryRun
272 }
273 }
274
275 func WithProgressscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/WithProgress().(m *Meterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Meter#) Optionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Option# {
276 return func(tq *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) {
277 tq.meterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#meter. = m
278 }
279 }
280
281 func RemoteRefscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/RemoteRef().(ref *gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.Refscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Ref#) Optionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Option# {
282 return func(tq *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) {
283 tq.refscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#ref. = ref
284 }
285 }
286
287 func WithProgressCallbackscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/WithProgressCallback().(cb toolsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/.CopyCallbackscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tools`/CopyCallback#) Optionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Option# {
288 return func(tq *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) {
289 tq.cbscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#cb. = cb
290 }
291 }
292
293 func WithBatchSizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/WithBatchSize().(size int) Optionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Option# {
294 return func(tq *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) { tq.batchSizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#batchSize. = size }
295 }
296
297 func WithBufferDepthscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/WithBufferDepth().(depth int) Optionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Option# {
298 return func(tq *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) { tq.bufferDepthscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#bufferDepth. = depth }
299 }
300
301 // NewTransferQueue builds a TransferQueue, direction and underlying mechanism determined by adapter
302 func NewTransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/NewTransferQueue().(dir Directionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Direction#, manifest Manifestscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Manifest#, remote string, options ...Optionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Option#) *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue# {
303 q := &TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#{
304 directionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#direction.: dir,
305 remotescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#remote.: remote,
306 errorcscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errorc.: make(chan error),
307 transfersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#transfers.: make(map[string]*objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#),
308 trMutexscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#trMutex.: &syncscip-go gomod github.com/golang/go/src go1.25.0 sync/.Mutexscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#{},
309 manifestscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#manifest.: manifest,
310 rcscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#rc.: newRetryCounterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/newRetryCounter().(),
311 waitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#wait.: newAbortableWaitGroupscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/newAbortableWaitGroup().(),
312 }
313
314 for _, opt := range options {
315 opt(q)
316 }
317
318 if q.batchSizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#batchSize. <= 0 {
319 q.batchSizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#batchSize. = defaultBatchSizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/defaultBatchSize.
320 }
321 if q.bufferDepthscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#bufferDepth. <= 0 {
322 q.bufferDepthscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#bufferDepth. = q.batchSizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#batchSize.
323 }
324 if q.meterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#meter. != nil {
325 q.meterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#meter..Directionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Meter#Direction. = q.directionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#direction.
326 }
327
328 q.incomingscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#incoming. = make(chan *objectTuplescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#, q.bufferDepthscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#bufferDepth.)
329 q.collectorWaitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#collectorWait..Addscip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#Add().(1)
330 q.errorwaitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errorwait..Addscip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#Add().(1)
331 q.runscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#run().()
332
333 return q
334 }
335
336 // Ensure we have a concrete manifest and that certain delayed variables are set
337 // properly.
338 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) Upgradescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#Upgrade().() {
339 if q.clientscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#client. == nil {
340 manifest := q.manifestscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#manifest..Upgradescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Manifest#Upgrade.()
341 q.clientscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#client. = &tqClientscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/tqClient#{Clientscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/tqClient#Client.: manifest.APIClientscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/concreteManifest#APIClient().()}
342 q.rcscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#rc..MaxRetriesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#MaxRetries. = manifest.maxRetriesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/concreteManifest#maxRetries.
343 q.rcscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#rc..MaxRetryDelayscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#MaxRetryDelay. = manifest.maxRetryDelayscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/concreteManifest#maxRetryDelay.
344 q.clientscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#client..SetMaxRetriesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/tqClient#SetMaxRetries().(manifest.maxRetriesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/concreteManifest#maxRetries.)
345 }
346 }
347
348 // Add adds a *Transfer to the transfer queue. It only increments the amount
349 // of waiting the TransferQueue has to do if the *Transfer "t" is new.
350 //
351 // If another transfer(s) with the same OID has been added to the *TransferQueue
352 // already, the given transfer will not be enqueued, but will be sent to any
353 // channel created by Watch() once the oldest transfer has completed.
354 //
355 // Only one file will be transferred to/from the Path element of the first
356 // transfer.
357 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) Addscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#Add().(name, path, oid string, size int64, missing bool, err error) {
358 q.Upgradescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#Upgrade().()
359
360 if err != nil {
361 q.errorcscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errorc. <- err
362 return
363 }
364
365 t := &objectTuplescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#{
366 Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Name.: name,
367 Pathscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Path.: path,
368 Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Oid.: oid,
369 Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Size.: size,
370 Missingscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Missing.: missing,
371 }
372
373 if objs := q.rememberscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#remember().(t); len(objs.objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#objects.) > 1 {
374 if objs.completedscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#completed. {
375 // If there is already a completed transfer chain for
376 // this OID, then this object is already "done", and can
377 // be sent through as completed to the watchers.
378 for _, w := range q.watchersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#watchers. {
379 w <- t.ToTransferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#ToTransfer().()
380 }
381 }
382
383 // If the chain is not done, there is no reason to enqueue this
384 // transfer into 'q.incoming'.
385 tracerxscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/.Printfscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/Printf().("already transferring %q, skipping duplicate", t.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Oid.)
386 return
387 }
388
389 q.incomingscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#incoming. <- t
390 }
391
392 // remember remembers the *Transfer "t" if the *TransferQueue doesn't already
393 // know about a Transfer with the same OID.
394 //
395 // It returns if the value is new or not.
396 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) rememberscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#remember().(t *objectTuplescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#) objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects# {
397 q.Upgradescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#Upgrade().()
398
399 q.trMutexscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#trMutex..Lockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Lock().()
400 defer q.trMutexscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#trMutex..Unlockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Unlock().()
401
402 if _, ok := q.transfersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#transfers.[t.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Oid.]; !ok {
403 q.waitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#wait..Addscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#Add().(1)
404 q.transfersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#transfers.[t.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Oid.] = &objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#{
405 objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#objects.: []*objectTuplescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#{t},
406 }
407
408 return *q.transfersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#transfers.[t.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Oid.]
409 }
410
411 q.transfersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#transfers.[t.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Oid.] = q.transfersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#transfers.[t.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Oid.].Appendscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#Append().(t)
412
413 return *q.transfersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#transfers.[t.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Oid.]
414 }
415
416 // collectBatches collects batches in a loop, prioritizing failed items from the
417 // previous before adding new items. The process works as follows:
418 //
419 // 1. Create a new batch, of size `q.batchSize`, and containing no items
420 // 2. While the batch contains less items than `q.batchSize` AND the channel
421 // is open, read one item from the `q.incoming` channel.
422 // a. If the read was a channel close, go to step 4.
423 // b. If the read was a transferable item, go to step 3.
424 // 3. Append the item to the batch.
425 // 4. Sort the batch by descending object size, make a batch API call, send
426 // the items to the `*adapterBase`.
427 // 5. In a separate goroutine, process the worker results, incrementing and
428 // appending retries if possible. On the main goroutine, accept new items
429 // into "pending".
430 // 6. Concat() the "next" and "pending" batches such that no more items than
431 // the maximum allowed per batch are in next, and the rest are in pending.
432 // 7. If the `q.incoming` channel is open, go to step 2.
433 // 8. If the next batch is empty AND the `q.incoming` channel is closed,
434 // terminate immediately.
435 //
436 // collectBatches runs in its own goroutine.
437 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) collectBatchesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#collectBatches().() {
438 defer q.collectorWaitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#collectorWait..Donescip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#Done().()
439
440 var closing bool
441 next := q.makeBatchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#makeBatch().()
442 pending := q.makeBatchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#makeBatch().()
443
444 for {
445 for !closing && (len(next) < q.batchSizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#batchSize.) {
446 t, ok := <-q.incomingscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#incoming.
447 if !ok {
448 closing = true
449 break
450 }
451
452 next = append(next, t)
453 }
454
455 // Before enqueuing the next batch, sort by descending object
456 // size.
457 sortscip-go gomod github.com/golang/go/src go1.25.0 sort/.Sortscip-go gomod github.com/golang/go/src go1.25.0 sort/Sort().(sortscip-go gomod github.com/golang/go/src go1.25.0 sort/.Reversescip-go gomod github.com/golang/go/src go1.25.0 sort/Reverse().(next))
458
459 done := make(chan struct{})
460
461 var retries batchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch#
462 var err error
463
464 go func() {
465 defer close(done)
466
467 if len(next) == 0 {
468 return
469 }
470
471 retries, err = q.enqueueAndCollectRetriesForscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#enqueueAndCollectRetriesFor().(next)
472 if err != nil {
473 q.errorcscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errorc. <- err
474 }
475 }()
476
477 var collected batchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch#
478 collected, closing = q.collectPendingUntilscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#collectPendingUntil().(done)
479
480 // If we've encountered a serious error here, abort immediately;
481 // don't process further batches. Abort the wait queue so that
482 // we don't deadlock waiting for objects to complete when they
483 // never will.
484 if err != nil && !errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/.IsRetriableErrorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/IsRetriableError().(err) {
485 q.waitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#wait..Abortscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#Abort().()
486 break
487 }
488
489 // Ensure the next batch is filled with, in order:
490 //
491 // - retries from the previous batch,
492 // - new additions that were enqueued behind retries, &
493 // - items collected while the batch was processing.
494 var minWaitTime timescip-go gomod github.com/golang/go/src go1.25.0 time/.Durationscip-go gomod github.com/golang/go/src go1.25.0 time/Duration#
495 next, pending, minWaitTime = retries.Concatscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch#Concat().(append(pending, collected...), q.batchSizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#batchSize.)
496 if len(next) == 0 && len(pending) != 0 {
497 // There are some pending that could not be queued.
498 // Wait the requested time before resuming loop.
499 tracerxscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/.Printfscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/Printf().("tq: rate limited, waiting %s before retrying", minWaitTime)
500 timescip-go gomod github.com/golang/go/src go1.25.0 time/.Sleepscip-go gomod github.com/golang/go/src go1.25.0 time/Sleep().(minWaitTime)
501 } else if len(next) == 0 && len(pending) == 0 && closing {
502 // There are no items remaining, it is safe to break
503 break
504 }
505 }
506 }
507
508 // collectPendingUntil collects items from q.incoming into a "pending" batch
509 // until the given "done" channel is written to, or is closed.
510 //
511 // A "pending" batch is returned, along with whether or not "q.incoming" is
512 // closed.
513 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) collectPendingUntilscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#collectPendingUntil().(done <-chan struct{}) (pending batchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch#, closing bool) {
514 q.Upgradescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#Upgrade().()
515
516 for {
517 select {
518 case t, ok := <-q.incomingscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#incoming.:
519 if !ok {
520 closing = true
521 <-done
522 return
523 }
524
525 pending = append(pending, t)
526 case <-done:
527 return
528 }
529 }
530 }
531
532 // enqueueAndCollectRetriesFor makes a Batch API call and returns a "next" batch
533 // containing all of the objects that failed from the previous batch and had
534 // retries available to them.
535 //
536 // If an error was encountered while making the API request, _all_ of the items
537 // from the previous batch (that have retries available to them) will be
538 // returned immediately, along with the error that was encountered.
539 //
540 // enqueueAndCollectRetriesFor blocks until the entire Batch "batch" has been
541 // processed.
542 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) enqueueAndCollectRetriesForscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#enqueueAndCollectRetriesFor().(batch batchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch#) (batchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch#, error) {
543 q.Upgradescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#Upgrade().()
544
545 next := q.makeBatchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#makeBatch().()
546 tracerxscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/.Printfscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/Printf().("tq: sending batch of size %d", len(batch))
547
548 enqueueRetry := func(t *objectTuplescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#, err error, readyTime *timescip-go gomod github.com/golang/go/src go1.25.0 time/.Timescip-go gomod github.com/golang/go/src go1.25.0 time/Time#) {
549 count := q.rcscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#rc..Incrementscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#Increment().(t.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Oid.)
550
551 if !t.retryLaterTimescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#retryLaterTime..IsZeroscip-go gomod github.com/golang/go/src go1.25.0 time/Time#IsZero().() {
552 t.ReadyTimescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#ReadyTime. = t.retryLaterTimescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#retryLaterTime.
553 t.retryLaterTimescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#retryLaterTime. = timescip-go gomod github.com/golang/go/src go1.25.0 time/.Timescip-go gomod github.com/golang/go/src go1.25.0 time/Time#{}
554 } else if readyTime == nil {
555 t.ReadyTimescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#ReadyTime. = q.rcscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#rc..ReadyTimescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#ReadyTime().(t.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Oid.)
556 } else {
557 t.ReadyTimescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#ReadyTime. = *readyTime
558 }
559 delay := timescip-go gomod github.com/golang/go/src go1.25.0 time/.Untilscip-go gomod github.com/golang/go/src go1.25.0 time/Until().(t.ReadyTimescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#ReadyTime.).Secondsscip-go gomod github.com/golang/go/src go1.25.0 time/Duration#Seconds().()
560
561 var errMsg string
562 if err != nil {
563 errMsg = fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.25.0 fmt/Sprintf().(": %s", err)
564 }
565 tracerxscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/.Printfscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/Printf().("tq: enqueue retry #%d after %.2fs for %q (size: %d)%s", count, delay, t.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Oid., t.Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Size., errMsg)
566 next = append(next, t)
567 }
568
569 q.meterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#meter..Pausescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Meter#Pause().()
570 var bRes *BatchResponsescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/BatchResponse#
571 manifest := q.manifestscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#manifest..Upgradescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Manifest#Upgrade.()
572 if manifest.standaloneTransferAgentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/concreteManifest#standaloneTransferAgent. != "" {
573 // Trust the external transfer agent can do everything by itself.
574 objects := make([]*Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#, 0, len(batch))
575 for _, t := range batch {
576 objects = append(objects, &Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#{Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Oid.: t.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Oid., Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Size.: t.Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Size., Pathscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Path.: t.Pathscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Path.})
577 }
578 bRes = &BatchResponsescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/BatchResponse#{
579 Objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/BatchResponse#Objects.: objects,
580 TransferAdapterNamescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/BatchResponse#TransferAdapterName.: manifest.standaloneTransferAgentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/concreteManifest#standaloneTransferAgent.,
581 }
582 } else {
583 // Query the Git LFS server for what transfer method to use and
584 // details such as URLs, authentication, etc.
585 var err error
586 bRes, err = Batchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Batch().(q.manifestscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#manifest., q.directionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#direction., q.remotescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#remote., q.refscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#ref., batch.ToTransfersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch#ToTransfers().())
587 if err != nil {
588 hasNonRetriableObjects := false
589 // If there was an error making the batch API call, mark all of
590 // the objects for retry if possible. If any should not be retried,
591 // they will be marked as failed.
592 for _, t := range batch {
593 if q.canRetryObjectscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#canRetryObject().(t.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Oid., err) {
594 enqueueRetry(t, err, nil)
595 } else if readyTime, canRetry := q.canRetryObjectLaterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#canRetryObjectLater().(t.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Oid., err); canRetry {
596 enqueueRetry(t, err, &readyTime)
597 } else {
598 hasNonRetriableObjects = true
599 q.waitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#wait..Donescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#Done().()
600 }
601 }
602
603 // Only return error and mark operation as failure if at least one object
604 // was not enqueued for retrial at a later point.
605 // Make sure to return an error which causes all other objects to be retried.
606 if hasNonRetriableObjects {
607 return next, errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/.NewRetriableErrorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/NewRetriableError().(err)
608 } else {
609 return next, nil
610 }
611 }
612 }
613
614 if len(bRes.Objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/BatchResponse#Objects.) == 0 {
615 return next, nil
616 }
617
618 // We check first that all of the objects we want to upload are present,
619 // and abort if any are missing. We'll never have any objects marked as
620 // missing except possibly on upload, so just skip iterating over the
621 // objects in that case.
622 if q.directionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#direction. == Uploadscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Upload. {
623 for _, o := range bRes.Objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/BatchResponse#Objects. {
624 // If the server already has the object, the list of
625 // actions will be empty. It's fine if the file is
626 // missing in that case, since we don't need to upload
627 // it.
628 if len(o.Actionsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Actions.) != 0 {
629 q.trMutexscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#trMutex..Lockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Lock().()
630 objects, ok := q.transfersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#transfers.[o.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Oid.]
631 q.trMutexscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#trMutex..Unlockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Unlock().()
632 // We expect only one objectTuple in this list
633 // as the uploadContext methods deduplicate
634 // identical OIDs before adding them to the
635 // transfer queue.
636 if ok && objects.Firstscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#First().().Missingscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Missing. {
637 tracerxscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/.Printfscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/Printf().("tq: stopping batched queue, object %q missing locally and on remote", o.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Oid.)
638 return nil, newObjectMissingErrorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/newObjectMissingError().(objects.Firstscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#First().().Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Name., o.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Oid.)
639 }
640 }
641 }
642 }
643
644 q.useAdapterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#useAdapter().(bRes.TransferAdapterNamescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/BatchResponse#TransferAdapterName.)
645 q.meterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#meter..Startscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Meter#Start().()
646
647 toTransfer := make([]*Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#, 0, len(bRes.Objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/BatchResponse#Objects.))
648
649 for _, o := range bRes.Objectsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/BatchResponse#Objects. {
650 if o.Errorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Error. != nil {
651 q.errorcscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errorc. <- errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/.Wrapfscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/Wrapf().(o.Errorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Error., "[%v] %v", o.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Oid., o.Errorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Error..Messagescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/ObjectError#Message.)
652 q.Skipscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#Skip().(o.Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Size.)
653 q.waitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#wait..Donescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#Done().()
654
655 continue
656 }
657
658 q.trMutexscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#trMutex..Lockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Lock().()
659 objects, ok := q.transfersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#transfers.[o.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Oid.]
660 q.trMutexscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#trMutex..Unlockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Unlock().()
661 if !ok {
662 // If we couldn't find any associated
663 // Transfer object, then we give up on the
664 // transfer by telling the progress meter to
665 // skip the number of bytes in "o".
666 q.errorcscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errorc. <- errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/.Newscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/New().(trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/.Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr..Getscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/Locale#Get().("[%v] The server returned an unknown OID.", o.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Oid.))
667
668 q.Skipscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#Skip().(o.Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Size.)
669 q.waitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#wait..Donescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#Done().()
670 } else {
671 // Pick t[0], since it will cover all transfers with the
672 // same OID.
673 tr := newTransferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/newTransfer().(o, objects.Firstscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#First().().Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Name., objects.Firstscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#First().().Pathscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Path.)
674
675 if a, err := tr.Relscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Rel().(q.directionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#direction..Stringscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Direction#String().()); err != nil {
676 if q.canRetryObjectscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#canRetryObject().(tr.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Oid., err) {
677 enqueueRetry(objects.Firstscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#First().(), err, nil)
678 } else {
679 q.errorcscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errorc. <- errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/.Errorfscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/Errorf().("[%v] %v", tr.Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Name., err)
680
681 q.Skipscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#Skip().(o.Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Size.)
682 q.waitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#wait..Donescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#Done().()
683 }
684 } else if a == nil && manifest.standaloneTransferAgentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/concreteManifest#standaloneTransferAgent. == "" {
685 q.Skipscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#Skip().(o.Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Size.)
686 q.waitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#wait..Donescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#Done().()
687 } else {
688 q.meterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#meter..StartTransferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Meter#StartTransfer().(objects.Firstscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#First().().Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Name.)
689 toTransfer = append(toTransfer, tr)
690 }
691 }
692 }
693
694 retries := q.addToAdapterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#addToAdapter().(bRes.endpointscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/BatchResponse#endpoint., toTransfer)
695 for t := range retries {
696 enqueueRetry(t, nil, nil)
697 }
698
699 return next, nil
700 }
701
702 // makeBatch returns a new, empty batch, with a capacity equal to the maximum
703 // batch size designated by the `*TransferQueue`.
704 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) makeBatchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#makeBatch().() batchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch# { return make(batchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/batch#, 0, q.batchSizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#batchSize.) }
705
706 // addToAdapter adds the given "pending" transfers to the transfer adapters and
707 // returns a channel of Transfers that are to be retried in the next batch.
708 // After all of the items in the batch have been processed, the channel is
709 // closed.
710 //
711 // addToAdapter returns immediately, and does not block.
712 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) addToAdapterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#addToAdapter().(e lfshttpscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/.Endpointscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/Endpoint#, pending []*Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#) <-chan *objectTuplescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple# {
713 q.Upgradescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#Upgrade().()
714
715 retries := make(chan *objectTuplescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#, len(pending))
716
717 if err := q.ensureAdapterBegunscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#ensureAdapterBegun().(e); err != nil {
718 close(retries)
719
720 q.errorcscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errorc. <- err
721 for _, t := range pending {
722 q.Skipscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#Skip().(t.Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Size.)
723 q.waitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#wait..Donescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#Done().()
724 }
725
726 return retries
727 }
728
729 present, missingResults := q.partitionTransfersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#partitionTransfers().(pending)
730
731 go func() {
732 defer close(retries)
733
734 var results <-chan TransferResultscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult#
735 if q.dryRunscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#dryRun. {
736 results = q.makeDryRunResultsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#makeDryRunResults().(present)
737 } else {
738 results = q.adapterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#adapter..Addscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Adapter#Add.(present...)
739 }
740
741 for _, res := range missingResults {
742 q.handleTransferResultscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#handleTransferResult().(res, retries)
743 }
744 for res := range results {
745 q.handleTransferResultscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#handleTransferResult().(res, retries)
746 }
747 }()
748
749 return retries
750 }
751
752 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) partitionTransfersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#partitionTransfers().(transfers []*Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#) (present []*Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#, results []TransferResultscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult#) {
753 q.Upgradescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#Upgrade().()
754
755 if q.directionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#direction. != Uploadscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Upload. {
756 return transfers, nil
757 }
758
759 present = make([]*Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#, 0, len(transfers))
760 results = make([]TransferResultscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult#, 0, len(transfers))
761
762 for _, t := range transfers {
763 var err error
764
765 if t.Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Size. < 0 {
766 err = errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/.Newscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/New().(trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/.Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr..Getscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/Locale#Get().("object %q has invalid size (got: %d)", t.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Oid., t.Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Size.))
767 } else {
768 fd, serr := osscip-go gomod github.com/golang/go/src go1.25.0 os/.Statscip-go gomod github.com/golang/go/src go1.25.0 os/Stat().(t.Pathscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Path.)
769 if serr != nil {
770 if osscip-go gomod github.com/golang/go/src go1.25.0 os/.IsNotExistscip-go gomod github.com/golang/go/src go1.25.0 os/IsNotExist().(serr) {
771 err = newObjectMissingErrorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/newObjectMissingError().(t.Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Name., t.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Oid.)
772 } else {
773 err = serr
774 }
775 } else if t.Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Size. != fd.Sizescip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/FileInfo#Size().() {
776 err = newCorruptObjectErrorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/newCorruptObjectError().(t.Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Name., t.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Oid.)
777 }
778 }
779
780 if err != nil {
781 results = append(results, TransferResultscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult#{
782 Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult#Transfer.: t,
783 Errorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult#Error.: err,
784 })
785 } else {
786 present = append(present, t)
787 }
788 }
789
790 return
791 }
792
793 // makeDryRunResults returns a channel populated immediately with "successful"
794 // results for all of the given transfers in "ts".
795 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) makeDryRunResultsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#makeDryRunResults().(ts []*Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#) <-chan TransferResultscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult# {
796 results := make(chan TransferResultscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult#, len(ts))
797 for _, t := range ts {
798 results <- TransferResultscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult#{t, nil}
799 }
800
801 close(results)
802
803 return results
804 }
805
806 // handleTransferResult observes the transfer result, sending it on the retries
807 // channel if it was able to be retried.
808 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) handleTransferResultscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#handleTransferResult().(
809 res TransferResultscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult#, retries chan<- *objectTuplescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#,
810 ) {
811 oid := res.Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult#Transfer..Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Oid.
812
813 if res.Errorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult#Error. != nil {
814 // If there was an error encountered when processing the
815 // transfer (res.Transfer), handle the error as is appropriate:
816 if readyTime, canRetry := q.canRetryObjectLaterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#canRetryObjectLater().(oid, res.Errorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult#Error.); canRetry {
817 // If the object can't be retried now, but can be
818 // after a certain period of time, send it to
819 // the retry channel with a time when it's ready.
820 tracerxscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/.Printfscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/Printf().("tq: retrying object %s after %.2fs", oid, timescip-go gomod github.com/golang/go/src go1.25.0 time/.Untilscip-go gomod github.com/golang/go/src go1.25.0 time/Until().(readyTime).Secondsscip-go gomod github.com/golang/go/src go1.25.0 time/Duration#Seconds().())
821 q.trMutexscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#trMutex..Lockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Lock().()
822 objects, ok := q.transfersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#transfers.[oid]
823 q.trMutexscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#trMutex..Unlockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Unlock().()
824
825 if ok {
826 t := objects.Firstscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#First().()
827 t.retryLaterTimescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#retryLaterTime. = readyTime
828 retries <- t
829 } else {
830 q.errorcscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errorc. <- res.Errorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult#Error.
831 }
832 } else if q.canRetryObjectscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#canRetryObject().(oid, res.Errorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult#Error.) {
833 // If the object can be retried, send it on the retries
834 // channel, where it will be read at the call-site and
835 // its retry count will be incremented.
836 tracerxscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/.Printfscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/Printf().("tq: retrying object %s: %s", oid, res.Errorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult#Error.)
837
838 q.trMutexscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#trMutex..Lockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Lock().()
839 objects, ok := q.transfersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#transfers.[oid]
840 q.trMutexscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#trMutex..Unlockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Unlock().()
841
842 if ok {
843 retries <- objects.Firstscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#First().()
844 } else {
845 q.errorcscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errorc. <- res.Errorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult#Error.
846 }
847 } else {
848 // If the error wasn't retriable, OR the object has
849 // exceeded its retry budget, it will be NOT be sent to
850 // the retry channel, and the error will be reported
851 // immediately (unless the error is in response to a
852 // HTTP 422).
853 if errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/.IsUnprocessableEntityErrorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/IsUnprocessableEntityError().(res.Errorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult#Error.) {
854 q.unsupportedContentTypescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#unsupportedContentType. = true
855 } else {
856 q.errorcscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errorc. <- res.Errorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult#Error.
857 }
858 q.waitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#wait..Donescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#Done().()
859 }
860 } else {
861 q.trMutexscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#trMutex..Lockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Lock().()
862 objects := q.transfersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#transfers.[oid]
863 objects.completedscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#completed. = true
864
865 // Otherwise, if the transfer was successful, notify all of the
866 // watchers, and mark it as finished.
867 for _, c := range q.watchersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#watchers. {
868 // Send one update for each transfer with the
869 // same OID.
870 for _, t := range objects.Allscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objects#All().() {
871 c <- &Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#{
872 Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Name.: t.Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Name.,
873 Pathscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Path.: t.Pathscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Path.,
874 Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Oid.: t.Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Oid.,
875 Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Size.: t.Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/objectTuple#Size.,
876 Actionsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Actions.: res.Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult#Transfer..Actionsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Actions.,
877 Linksscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Links.: res.Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult#Transfer..Linksscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Links.,
878 }
879 }
880 }
881
882 q.trMutexscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#trMutex..Unlockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Unlock().()
883
884 q.meterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#meter..FinishTransferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Meter#FinishTransfer().(res.Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferResult#Transfer..Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#Name.)
885 q.waitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#wait..Donescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#Done().()
886 }
887 }
888
889 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) useAdapterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#useAdapter().(name string) {
890 q.adapterInitMutexscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#adapterInitMutex..Lockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Lock().()
891 defer q.adapterInitMutexscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#adapterInitMutex..Unlockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Unlock().()
892
893 // The spec says clients MUST use the basic transfer adapter when
894 // the response omits the transfer property (docs/api/batch.md).
895 // Normalize here to match NewAdapterOrDefault.
896 if name == "" {
897 name = BasicAdapterNamescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/BasicAdapterName.
898 }
899
900 if q.adapterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#adapter. != nil {
901 if q.adapterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#adapter..Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Adapter#Name.() == name {
902 // re-use, this is the normal path
903 return
904 }
905 // If the adapter we're using isn't the same as the one we've been
906 // told to use now, must wait for the current one to finish then switch
907 // This will probably never happen but is just in case server starts
908 // changing adapter support in between batches
909 q.finishAdapterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#finishAdapter().()
910 }
911 q.adapterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#adapter. = q.manifestscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#manifest..NewAdapterOrDefaultscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Manifest#NewAdapterOrDefault.(name, q.directionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#direction.)
912 }
913
914 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) finishAdapterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#finishAdapter().() {
915 if q.adapterInProgressscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#adapterInProgress. {
916 q.adapterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#adapter..Endscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Adapter#End.()
917 q.adapterInProgressscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#adapterInProgress. = false
918 q.adapterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#adapter. = nil
919 }
920 }
921
922 // BatchSize returns the batch size of the receiving *TransferQueue, or, the
923 // number of transfers to accept before beginning work on them.
924 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) BatchSizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#BatchSize().() int {
925 return q.batchSizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#batchSize.
926 }
927
928 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) Skipscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#Skip().(size int64) {
929 q.meterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#meter..Skipscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Meter#Skip().(size)
930 }
931
932 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) ensureAdapterBegunscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#ensureAdapterBegun().(e lfshttpscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/.Endpointscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/Endpoint#) error {
933 q.Upgradescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#Upgrade().()
934
935 q.adapterInitMutexscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#adapterInitMutex..Lockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Lock().()
936 defer q.adapterInitMutexscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#adapterInitMutex..Unlockscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#Unlock().()
937
938 if q.adapterInProgressscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#adapterInProgress. {
939 return nil
940 }
941
942 // Progress callback - receives byte updates
943 cb := func(name string, total, read int64, current int) error {
944 q.meterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#meter..TransferBytesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Meter#TransferBytes().(q.directionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#direction..Stringscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Direction#String().(), name, read, total, current)
945 if q.cbscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#cb. != nil {
946 // NOTE: this is the mechanism by which the logpath
947 // specified by GIT_LFS_PROGRESS is written to.
948 //
949 // See: lfs.downloadFile() for more.
950 q.cbscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#cb.(total, read, current)
951 }
952 return nil
953 }
954
955 tracerxscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/.Printfscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/Printf().("tq: starting transfer adapter %q", q.adapterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#adapter..Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Adapter#Name.())
956 err := q.adapterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#adapter..Beginscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Adapter#Begin.(q.toAdapterCfgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#toAdapterCfg().(e), cb)
957 if err != nil {
958 return err
959 }
960 q.adapterInProgressscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#adapterInProgress. = true
961
962 return nil
963 }
964
965 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) toAdapterCfgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#toAdapterCfg().(e lfshttpscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/.Endpointscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/Endpoint#) AdapterConfigscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/AdapterConfig# {
966 apiClient := q.manifestscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#manifest..APIClientscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Manifest#APIClient.()
967 concurrency := q.manifestscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#manifest..ConcurrentTransfersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Manifest#ConcurrentTransfers.()
968
969 return &adapterConfigscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/adapterConfig#{
970 concurrentTransfersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/adapterConfig#concurrentTransfers.: concurrency,
971 apiClientscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/adapterConfig#apiClient.: apiClient,
972 remotescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/adapterConfig#remote.: q.remotescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#remote.,
973 }
974 }
975
976 // Wait waits for the queue to finish processing all transfers. Once Wait is
977 // called, Add will no longer add transfers to the queue. Any failed
978 // transfers will be automatically retried once.
979 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) Waitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#Wait().() {
980 close(q.incomingscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#incoming.)
981
982 q.waitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#wait..Waitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/abortableWaitGroup#Wait().()
983 q.collectorWaitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#collectorWait..Waitscip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#Wait().()
984
985 q.finishAdapterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#finishAdapter().()
986 close(q.errorcscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errorc.)
987
988 for _, watcher := range q.watchersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#watchers. {
989 close(watcher)
990 }
991
992 q.meterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#meter..Flushscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Meter#Flush().()
993 q.errorwaitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errorwait..Waitscip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#Wait().()
994
995 if q.unsupportedContentTypescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#unsupportedContentType. {
996 fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Fprintlnscip-go gomod github.com/golang/go/src go1.25.0 fmt/Fprintln().(osscip-go gomod github.com/golang/go/src go1.25.0 os/.Stderrscip-go gomod github.com/golang/go/src go1.25.0 os/Stderr., trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/.Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr..Getscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/Locale#Get().(`info: Uploading failed due to unsupported Content-Type header(s).
997 info: Consider disabling Content-Type detection with:
998 info:
999 info: $ git config lfs.contenttype false`))
1000 }
1001 }
1002
1003 // Watch returns a channel where the queue will write the value of each transfer
1004 // as it completes. If multiple transfers exist with the same OID, they will all
1005 // be recorded here, even though only one actual transfer took place. The
1006 // channel will be closed when the queue finishes processing.
1007 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) Watchscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#Watch().() chan *Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer# {
1008 c := make(chan *Transferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Transfer#, q.batchSizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#batchSize.)
1009 q.watchersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#watchers. = append(q.watchersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#watchers., c)
1010 return c
1011 }
1012
1013 // This goroutine collects errors returned from transfers
1014 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) errorCollectorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errorCollector().() {
1015 for err := range q.errorcscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errorc. {
1016 q.errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errors. = append(q.errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errors., err)
1017 }
1018 q.errorwaitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errorwait..Donescip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#Done().()
1019 }
1020
1021 // run begins the transfer queue. It transfers files sequentially or
1022 // concurrently depending on the Config.ConcurrentTransfers() value.
1023 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) runscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#run().() {
1024 tracerxscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/.Printfscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/Printf().("tq: running as batched queue, batch size of %d", q.batchSizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#batchSize.)
1025
1026 go q.errorCollectorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errorCollector().()
1027 go q.collectBatchesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#collectBatches().()
1028 }
1029
1030 // canRetry returns whether or not the given error "err" is retriable.
1031 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) canRetryscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#canRetry().(err error) bool {
1032 return errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/.IsRetriableErrorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/IsRetriableError().(err)
1033 }
1034
1035 // canRetryLater returns the number of seconds until an error can be retried and if the error
1036 // is a delayed-retriable error.
1037 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) canRetryLaterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#canRetryLater().(err error) (timescip-go gomod github.com/golang/go/src go1.25.0 time/.Timescip-go gomod github.com/golang/go/src go1.25.0 time/Time#, bool) {
1038 return errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/.IsRetriableLaterErrorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/IsRetriableLaterError().(err)
1039 }
1040
1041 // canRetryObject returns whether the given error is retriable for the object
1042 // given by "oid". If the an OID has met its retry limit, then it will not be
1043 // able to be retried again. If so, canRetryObject returns whether or not that
1044 // given error "err" is retriable.
1045 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) canRetryObjectscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#canRetryObject().(oid string, err error) bool {
1046 if count, ok := q.rcscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#rc..CanRetryscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#CanRetry().(oid); !ok {
1047 tracerxscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/.Printfscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/Printf().("tq: refusing to retry %q, too many retries (%d)", oid, count)
1048 return false
1049 }
1050
1051 return q.canRetryscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#canRetry().(err)
1052 }
1053
1054 // canRetryObjectLater returns the time at which the object identified by oid
1055 // may be retried and whether a retry should be done for the object.
1056 // If oid has reached its retry limit or the retry delay exceeds the configured
1057 // maximum, canRetryObjectLater returns false.
1058 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) canRetryObjectLaterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#canRetryObjectLater().(oid string, err error) (timescip-go gomod github.com/golang/go/src go1.25.0 time/.Timescip-go gomod github.com/golang/go/src go1.25.0 time/Time#, bool) {
1059 if count, ok := q.rcscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#rc..CanRetryscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/retryCounter#CanRetry().(oid); !ok {
1060 tracerxscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/.Printfscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/Printf().("tq: refusing to retry %q, too many retries (%d)", oid, count)
1061 return timescip-go gomod github.com/golang/go/src go1.25.0 time/.Timescip-go gomod github.com/golang/go/src go1.25.0 time/Time#{}, false
1062 }
1063
1064 retryAt, canRetry := q.canRetryLaterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#canRetryLater().(err)
1065 if !canRetry {
1066 return retryAt, false
1067 }
1068
1069 delay := timescip-go gomod github.com/golang/go/src go1.25.0 time/.Untilscip-go gomod github.com/golang/go/src go1.25.0 time/Until().(retryAt).Secondsscip-go gomod github.com/golang/go/src go1.25.0 time/Duration#Seconds().()
1070 maxRetryTime := float64(q.manifestscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#manifest..Upgradescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/Manifest#Upgrade.().MaxRetryTimescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/concreteManifest#MaxRetryTime().())
1071 if delay > maxRetryTime {
1072 tracerxscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/.Printfscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/Printf().(
1073 "tq: refusing to retry %q, retry after %.0fs exceeds maximum %ds",
1074 oid,
1075 delay,
1076 int(maxRetryTime),
1077 )
1078 return timescip-go gomod github.com/golang/go/src go1.25.0 time/.Timescip-go gomod github.com/golang/go/src go1.25.0 time/Time#{}, false
1079 }
1080
1081 return retryAt, true
1082 }
1083
1084 // Errors returns any errors encountered during transfer.
1085 func (q *TransferQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#) Errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#Errors().() []error {
1086 return q.errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/TransferQueue#errors.
1087 }