Index: perf/go/ingest/main.go |
diff --git a/perf/go/ingest/main.go b/perf/go/ingest/main.go |
index ebf9937087f50d6d6a133a564e2ed909ad2f60bd..7ffa1cddb135a1a60aa78ba9b585b21c51f1af2d 100644 |
--- a/perf/go/ingest/main.go |
+++ b/perf/go/ingest/main.go |
@@ -13,6 +13,7 @@ import ( |
"github.com/golang/glog" |
"skia.googlesource.com/buildbot.git/go/auth" |
"skia.googlesource.com/buildbot.git/go/common" |
+ "skia.googlesource.com/buildbot.git/go/database" |
"skia.googlesource.com/buildbot.git/go/gitinfo" |
"skia.googlesource.com/buildbot.git/perf/go/config" |
"skia.googlesource.com/buildbot.git/perf/go/db" |
@@ -73,13 +74,19 @@ func NewIngestionProcess(git *gitinfo.GitInfo, tileDir, datasetName string, ri i |
} |
func main() { |
+ // Setup DB flags. |
+ database.SetupFlags(db.PROD_DB_HOST, db.PROD_DB_PORT, database.USER_RW, db.PROD_DB_NAME) |
+ |
common.InitWithMetrics("ingest", *graphiteServer) |
// Initialize the database. We might not need the oauth dialog if it fails. |
- db.Init(db.ProdDatabaseConfig(*local)) |
+ conf, err := database.ConfigFromFlagsAndMetadata(*local, db.MigrationSteps()) |
+ if err != nil { |
+ glog.Fatal(err) |
+ } |
+ db.Init(conf) |
var client *http.Client |
- var err error |
if *doOauth { |
config := auth.DefaultOAuthConfig(*oauthCacheFile) |
client, err = auth.RunFlow(config) |