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

Unified Diff: alertserver/go/alertserver/main.go

Issue 836723005: Fixes needed to get alertserver back to running. (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Created 5 years, 11 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 | « alertserver/build_release ('k') | push/skiapush.conf » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: alertserver/go/alertserver/main.go
diff --git a/alertserver/go/alertserver/main.go b/alertserver/go/alertserver/main.go
index 99cf5771425c974d2b61e40de34dd954169f2e7f..b5227de3f93e986af9aea6371212a4631d61a700 100644
--- a/alertserver/go/alertserver/main.go
+++ b/alertserver/go/alertserver/main.go
@@ -98,7 +98,7 @@ func reloadTemplates() {
))
}
-func init() {
+func Init() {
reloadTemplates()
}
@@ -280,12 +280,6 @@ func commitsHandler(w http.ResponseWriter, r *http.Request) {
}
func runServer(serverURL string) {
- _, filename, _, _ := runtime.Caller(0)
- cwd := filepath.Join(filepath.Dir(filename), "../..")
- if err := os.Chdir(cwd); err != nil {
- glog.Fatal(err)
- }
-
http.HandleFunc("/res/", autogzip.HandleFunc(makeResourceHandler()))
http.HandleFunc("/", alertHandler)
http.HandleFunc("/commits", commitsHandler)
@@ -304,6 +298,7 @@ func main() {
v := skiaversion.GetVersion()
glog.Infof("Version %s, built at %s", v.Commit, v.Date)
+ Init()
parsedPollInterval, err := time.ParseDuration(*alertPollInterval)
if err != nil {
glog.Fatalf("Failed to parse -alertPollInterval: %s", *alertPollInterval)
« no previous file with comments | « alertserver/build_release ('k') | push/skiapush.conf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698