Skip to content

Commit

Permalink
ClickHouse support
Browse files Browse the repository at this point in the history
  • Loading branch information
pieceowater committed Oct 7, 2024
1 parent 51a7da9 commit 01caba1
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions internal/boot/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,11 @@ func (b *Bootstrap) Setup(cfg conf.Config, startupFunc func() any, messageHandle
envInst.Init(cfg.Env.Required)

// Initialize the database
if b.PGDB != nil {
b.PGDB = pg.NewPGDB(cfg.Database.PG)
b.PGDB.InitDB()
}
b.PGDB = pg.NewPGDB(cfg.Database.PG)
b.PGDB.InitDB()

if b.ClickHouse != nil {
b.ClickHouse = ch.NewClickHouseDB(cfg.Database.ClickHouse)
b.ClickHouse.InitDB()
}
b.ClickHouse = ch.NewClickHouseDB(cfg.Database.ClickHouse)
b.ClickHouse.InitDB()

color.Set(color.FgCyan)
log.Println("Setup complete.")
Expand Down

0 comments on commit 01caba1

Please sign in to comment.