Skip to content

Commit

Permalink
fix bug where some graphql pumps are not reading env properly (#780)
Browse files Browse the repository at this point in the history
  • Loading branch information
kofoworola authored Jan 29, 2024
1 parent 8ca8646 commit d9d64dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pumps/graph_mongo.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import (

const mongoGraphPrefix = "mongo-graph-pump"

var mongoGraphDefaultEnv = PUMPS_ENV_PREFIX + "_MONGOGRAPH" + PUMPS_ENV_META_PREFIX

type GraphMongoPump struct {
CommonPumpConfig
MongoPump
Expand Down Expand Up @@ -60,6 +62,7 @@ func (g *GraphMongoPump) Init(config interface{}) error {
if err := mapstructure.Decode(config, &g.dbConf.BaseMongoConf); err != nil {
return err
}
processPumpEnvVars(g, g.log, g.dbConf, mongoGraphDefaultEnv)

if g.dbConf.MaxInsertBatchSizeBytes == 0 {
g.log.Info("-- No max batch size set, defaulting to 10MB")
Expand Down
4 changes: 4 additions & 0 deletions pumps/graph_sql_aggregate.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ func (s *GraphSQLAggregatePump) GetName() string {
return "Sql Graph Aggregate Pump"
}

func (s *GraphSQLAggregatePump) GetEnvPrefix() string {
return s.SQLConf.EnvPrefix
}

func (s *GraphSQLAggregatePump) New() Pump {
return &GraphSQLAggregatePump{}
}
Expand Down

0 comments on commit d9d64dc

Please sign in to comment.