| Index: perf/go/ingest/main.go
|
| diff --git a/perf/go/ingest/main.go b/perf/go/ingest/main.go
|
| index cb4aa2e34a947e95681b75fec435f05375ab6183..e22ca9b4774026248c9b8f8f94a2cea27a117824 100644
|
| --- a/perf/go/ingest/main.go
|
| +++ b/perf/go/ingest/main.go
|
| @@ -16,6 +16,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"
|
| @@ -139,15 +140,21 @@ func NewIngestionProcess(ts *Timestamps, tsName string, git *gitinfo.GitInfo, ti
|
| }
|
|
|
| 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)
|
|
|
| goldingester.Init(*fileCacheDir)
|
|
|
| // 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)
|
|
|