Skip to content

Commit

Permalink
better env name
Browse files Browse the repository at this point in the history
  • Loading branch information
absorbb committed Feb 28, 2024
1 parent 039a1d3 commit 30023e5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bulkerapp/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (a *Context) InitContext(settings *appbase.AppSettings) error {

a.eventsLogService = &eventslog.DummyEventsLogService{}
elServices := []eventslog.EventsLogService{}
if a.config.ClickhouseURL != "" {
if a.config.ClickhouseHost != "" {
chEventsLogService, err := eventslog.NewClickhouseEventsLog(a.config.EventsLogConfig)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion eventslog/ch_events_log.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type ClickhouseEventsLog struct {
func NewClickhouseEventsLog(config EventsLogConfig) (EventsLogService, error) {
base := appbase.NewServiceBase(chEventsLogServiceName)
conn, err := clickhouse.Open(&clickhouse.Options{
Addr: []string{config.ClickhouseURL},
Addr: []string{config.ClickhouseHost},
Auth: clickhouse.Auth{
Database: config.ClickhouseDatabase,
Username: utils.NvlString(config.ClickhouseUsername, "default"),
Expand Down
2 changes: 1 addition & 1 deletion eventslog/events_log_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
)

type EventsLogConfig struct {
ClickhouseURL string `mapstructure:"CLICKHOUSE_URL"`
ClickhouseHost string `mapstructure:"CLICKHOUSE_HOST"`
ClickhouseDatabase string `mapstructure:"CLICKHOUSE_DATABASE"`
ClickhouseUsername string `mapstructure:"CLICKHOUSE_USERNAME"`
ClickhousePassword string `mapstructure:"CLICKHOUSE_PASSWORD"`
Expand Down
2 changes: 1 addition & 1 deletion ingest/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (a *Context) InitContext(settings *appbase.AppSettings) error {
a.scriptRepository = NewScriptRepository(a.config.ScriptOrigin, a.config.CacheDir)
a.eventsLogService = &eventslog.DummyEventsLogService{}
elServices := []eventslog.EventsLogService{}
if a.config.ClickhouseURL != "" {
if a.config.ClickhouseHost != "" {
chEventsLogService, err := eventslog.NewClickhouseEventsLog(a.config.EventsLogConfig)
if err != nil {
return err
Expand Down

0 comments on commit 30023e5

Please sign in to comment.