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

Side by Side Diff: ct/go/master_scripts/capture_skps_on_workers/main.go

Issue 1245903003: Fix endpoint to update CaptureSKPs task (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // capture_skps_on_workers is an application that captures SKPs of the 1 // capture_skps_on_workers is an application that captures SKPs of the
2 // specified patchset type on all CT workers and uploads the results to Google 2 // specified patchset type on all CT workers and uploads the results to Google
3 // Storage. The requester is emailed when the task is done. 3 // Storage. The requester is emailed when the task is done.
4 package main 4 package main
5 5
6 import ( 6 import (
7 "bytes" 7 "bytes"
8 "flag" 8 "flag"
9 "fmt" 9 "fmt"
10 "strings" 10 "strings"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 if err := util.SendEmail(recipients, emailSubject, emailBody); err != ni l { 48 if err := util.SendEmail(recipients, emailSubject, emailBody); err != ni l {
49 glog.Errorf("Error while sending email: %s", err) 49 glog.Errorf("Error while sending email: %s", err)
50 return 50 return
51 } 51 }
52 } 52 }
53 53
54 func updateWebappTask() { 54 func updateWebappTask() {
55 extraData := map[string]string{ 55 extraData := map[string]string{
56 "output_link": outputRemoteLink, 56 "output_link": outputRemoteLink,
57 } 57 }
58 » if err := util.UpdateWebappTask(*gaeTaskID, util.CaptureSKPsTasksWebapp, extraData); err != nil { 58 » if err := util.UpdateWebappTask(*gaeTaskID, util.UpdateCaptureSKPsTasksW ebapp, extraData); err != nil {
59 glog.Errorf("Error while updating webapp task: %s", err) 59 glog.Errorf("Error while updating webapp task: %s", err)
60 return 60 return
61 } 61 }
62 } 62 }
63 63
64 func main() { 64 func main() {
65 common.Init() 65 common.Init()
66 66
67 // Send start email. 67 // Send start email.
68 emailsArr := util.ParseEmails(*emails) 68 emailsArr := util.ParseEmails(*emails)
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 captureSKPsCmdBytes.String(), 128 captureSKPsCmdBytes.String(),
129 } 129 }
130 // Setting a 2 day timeout since it may take a while to capture 1M SKPs. 130 // Setting a 2 day timeout since it may take a while to capture 1M SKPs.
131 if _, err := util.SSH(strings.Join(cmd, " "), util.Slaves, 2*24*time.Hou r); err != nil { 131 if _, err := util.SSH(strings.Join(cmd, " "), util.Slaves, 2*24*time.Hou r); err != nil {
132 glog.Errorf("Error while running cmd %s: %s", cmd, err) 132 glog.Errorf("Error while running cmd %s: %s", cmd, err)
133 return 133 return
134 } 134 }
135 135
136 taskCompletedSuccessfully = true 136 taskCompletedSuccessfully = true
137 } 137 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698