MCPcopy Create free account
hub / github.com/AdRoll/baker / worker

Method worker

input/inpututils/compressedstream.go:188–206  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

186}
187
188func (s *CompressedInput) worker() {
189 // Process incoming files on the s.files channel.
190 // If the channel is closed, it means that we processed all the
191 // channels that we should have processed, and we can safely exit.
192 // If the s.stopNow channel is signaled, we need to abort
193 // as soon as possible.
194 for {
195 select {
196 case fn, ok := <-s.files:
197 if !ok {
198 // Channel is closed, we're done
199 return
200 }
201 s.ParseFile(fn)
202 case <-s.stopNow:
203 return
204 }
205 }
206}
207
208func (s *CompressedInput) SetOutputChannel(data chan<- *baker.Data) {
209 s.data = data

Callers 1

NewCompressedInputFunction · 0.95

Calls 1

ParseFileMethod · 0.95

Tested by

no test coverage detected