Skip to content

Commit

Permalink
Update CHANGELOG for v0.10.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbub committed Jun 21, 2021
1 parent 2329ee4 commit f719e16
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.10.0

* Drop sqlx, use stdlib database.
* Add Makefile.

## 0.9.2

* Fix docker image templates.
Expand Down
6 changes: 3 additions & 3 deletions cmd/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ func checkHealth(ctx *cli.Context) error {

db, err := sql.Open("postgres", cfg.DatabaseURL)
if err != nil {
return fmt.Errorf("could not initialize store: %v", err)
return fmt.Errorf("could not open db: %v", err)
}
defer db.Close()

st := sqlstore.New(db)
store := sqlstore.New(db)

checkCtx, cancel := context.WithTimeout(context.Background(), cfg.StoreTimeout)
defer cancel()

if err := st.Check(checkCtx); err != nil {
if err := store.Check(checkCtx); err != nil {
return fmt.Errorf("store health check failed: %v", err)
}
return nil
Expand Down
8 changes: 4 additions & 4 deletions cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ func runServer(ctx *cli.Context) error {

db, err := sql.Open("postgres", cfg.DatabaseURL)
if err != nil {
return fmt.Errorf("could not initialize store: %v", err)
return fmt.Errorf("could not open db: %v", err)
}
defer db.Close()

st := sqlstore.New(db)
store := sqlstore.New(db)

checkCtx, cancel := context.WithTimeout(context.Background(), cfg.StoreTimeout)
defer cancel()

if err := st.Check(checkCtx); err != nil {
if err := store.Check(checkCtx); err != nil {
return fmt.Errorf("could not check store: %v", err)
}

exp := collector.New(cfg, st)
exp := collector.New(cfg, store)
srv := server.New(cfg, exp)

log.Println("Starting ", collector.Name, version.Info())
Expand Down

0 comments on commit f719e16

Please sign in to comment.