Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6358)

Unified Diff: client/cmd/isolate/exp_archive.go

Issue 2988133002: isolate: manage lifetime of checker and uploader in main. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | client/cmd/isolate/upload_tracker.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/cmd/isolate/exp_archive.go
diff --git a/client/cmd/isolate/exp_archive.go b/client/cmd/isolate/exp_archive.go
index cfd8d5f78e5e99faa3f08b8ac960cc9b905d077a..974ca00e2e02b6369a87948a95ad782d4b391c4f 100644
--- a/client/cmd/isolate/exp_archive.go
+++ b/client/cmd/isolate/exp_archive.go
@@ -98,6 +98,17 @@ func (c *expArchiveRun) main() error {
archiver := NewTarringArchiver(checker, uploader)
isolSummary, err := archiver.Archive(archiveOpts)
+
+ // Make sure that all pending items have been checked.
+ if err := checker.Close(); err != nil {
+ return err
+ }
+
+ // Make sure that all the uploads have completed successfully.
+ if err := uploader.Close(); err != nil {
+ return err
+ }
+
printSummary(isolSummary)
if c.dumpJSON != "" {
f, err := os.OpenFile(c.dumpJSON, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644)
« no previous file with comments | « no previous file | client/cmd/isolate/upload_tracker.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698