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

Method Stop

upload/s3.go:205–216  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

203}
204
205func (u *S3) Stop() {
206 // Stop may be called by the Topology in case of early exit (i.e CTRL-C),
207 // in that case u.quit would be closed twice since Stop() is also called
208 // by S3Upload.Run(). Both paths are necessary for a graceful exit; to the
209 // upload that means making sure all files have been uploaded.
210 u.stopOnce.Do(func() {
211 // Signal the upload goroutine to not go further the currently
212 // initiated call and wait for it to have terminated.
213 close(u.quit)
214 u.wgUpload.Wait()
215 })
216}
217
218func (u *S3) Stats() baker.UploadStats {
219 bag := make(baker.MetricsBag)

Callers 1

RunMethod · 0.95

Calls 1

WaitMethod · 0.45

Tested by

no test coverage detected