| OLD | NEW |
| 1 package main | 1 package main |
| 2 | 2 |
| 3 import ( | 3 import ( |
| 4 "encoding/json" | 4 "encoding/json" |
| 5 "flag" | 5 "flag" |
| 6 "fmt" | 6 "fmt" |
| 7 "io/ioutil" | 7 "io/ioutil" |
| 8 "net/http" | 8 "net/http" |
| 9 "os" | 9 "os" |
| 10 "path/filepath" | 10 "path/filepath" |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 vdb := database.NewVersionedDB(conf) | 362 vdb := database.NewVersionedDB(conf) |
| 363 | 363 |
| 364 storages = &storage.Storage{ | 364 storages = &storage.Storage{ |
| 365 DiffStore: diffStore, | 365 DiffStore: diffStore, |
| 366 ExpectationsStore: expstorage.NewCachingExpectationStore(expstor
age.NewSQLExpectationStore(vdb)), | 366 ExpectationsStore: expstorage.NewCachingExpectationStore(expstor
age.NewSQLExpectationStore(vdb)), |
| 367 IgnoreStore: ignore.NewSQLIgnoreStore(vdb), | 367 IgnoreStore: ignore.NewSQLIgnoreStore(vdb), |
| 368 TileStore: filetilestore.NewFileTileStore(*tileStoreDir,
pconfig.DATASET_GOLD, 2*time.Minute), | 368 TileStore: filetilestore.NewFileTileStore(*tileStoreDir,
pconfig.DATASET_GOLD, 2*time.Minute), |
| 369 NCommits: *nCommits, | 369 NCommits: *nCommits, |
| 370 } | 370 } |
| 371 | 371 |
| 372 if err := ignore.Init(storages.IgnoreStore); err != nil { |
| 373 glog.Fatalf("Failed to start monitoring for expired ignore rules
: %s", err) |
| 374 } |
| 375 |
| 372 // Enable the experimental features. | 376 // Enable the experimental features. |
| 373 if *startExperimental { | 377 if *startExperimental { |
| 374 tallies, err = tally.New(storages) | 378 tallies, err = tally.New(storages) |
| 375 if err != nil { | 379 if err != nil { |
| 376 glog.Fatalf("Failed to build tallies: %s", err) | 380 glog.Fatalf("Failed to build tallies: %s", err) |
| 377 } | 381 } |
| 378 | 382 |
| 379 summaries, err = summary.New(storages, tallies) | 383 summaries, err = summary.New(storages, tallies) |
| 380 if err != nil { | 384 if err != nil { |
| 381 glog.Fatalf("Failed to build summary: %s", err) | 385 glog.Fatalf("Failed to build summary: %s", err) |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 // Everything else is served out of the static directory. | 445 // Everything else is served out of the static directory. |
| 442 router.PathPrefix("/").Handler(http.FileServer(http.Dir(*staticDir))) | 446 router.PathPrefix("/").Handler(http.FileServer(http.Dir(*staticDir))) |
| 443 | 447 |
| 444 // Send all requests to the router | 448 // Send all requests to the router |
| 445 http.Handle("/", util.LoggingGzipRequestResponse(router)) | 449 http.Handle("/", util.LoggingGzipRequestResponse(router)) |
| 446 | 450 |
| 447 // Start the server | 451 // Start the server |
| 448 glog.Infoln("Serving on http://127.0.0.1" + *port) | 452 glog.Infoln("Serving on http://127.0.0.1" + *port) |
| 449 glog.Fatal(http.ListenAndServe(*port, nil)) | 453 glog.Fatal(http.ListenAndServe(*port, nil)) |
| 450 } | 454 } |
| OLD | NEW |