OLD | NEW |
1 package main | 1 package main |
2 | 2 |
3 // ingest is the command line tool for pulling performance data from Google | 3 // ingest is the command line tool for pulling performance data from Google |
4 // Storage and putting in Tiles. See the code in go/ingester for details on how | 4 // Storage and putting in Tiles. See the code in go/ingester for details on how |
5 // ingestion is done. | 5 // ingestion is done. |
6 | 6 |
7 import ( | 7 import ( |
8 "encoding/json" | 8 "encoding/json" |
9 "flag" | 9 "flag" |
10 "net/http" | 10 "net/http" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 } | 137 } |
138 } | 138 } |
139 } | 139 } |
140 | 140 |
141 func main() { | 141 func main() { |
142 common.InitWithMetrics("ingest", *graphiteServer) | 142 common.InitWithMetrics("ingest", *graphiteServer) |
143 | 143 |
144 goldingester.Init(*fileCacheDir) | 144 goldingester.Init(*fileCacheDir) |
145 | 145 |
146 // Initialize the database. We might not need the oauth dialog if it fai
ls. | 146 // Initialize the database. We might not need the oauth dialog if it fai
ls. |
147 » db.Init(db.ProdDatabaseConfig(*local)) | 147 » db.Init(db.DatabaseConfig(*local)) |
148 | 148 |
149 var client *http.Client | 149 var client *http.Client |
150 var err error | 150 var err error |
151 if *doOauth { | 151 if *doOauth { |
152 config := auth.DefaultOAuthConfig(*oauthCacheFile) | 152 config := auth.DefaultOAuthConfig(*oauthCacheFile) |
153 client, err = auth.RunFlow(config) | 153 client, err = auth.RunFlow(config) |
154 if err != nil { | 154 if err != nil { |
155 glog.Fatalf("Failed to auth: %s", err) | 155 glog.Fatalf("Failed to auth: %s", err) |
156 } | 156 } |
157 } else { | 157 } else { |
(...skipping 22 matching lines...) Expand all Loading... |
180 glog.Infof("Process name: %s", name) | 180 glog.Infof("Process name: %s", name) |
181 if process, ok := ingesters[name]; ok { | 181 if process, ok := ingesters[name]; ok { |
182 go process() | 182 go process() |
183 } else { | 183 } else { |
184 glog.Fatalf("Not a valid ingester name: %s", name) | 184 glog.Fatalf("Not a valid ingester name: %s", name) |
185 } | 185 } |
186 } | 186 } |
187 | 187 |
188 select {} | 188 select {} |
189 } | 189 } |
OLD | NEW |