Skip to content

Commit

Permalink
update postgreshost env var
Browse files Browse the repository at this point in the history
  • Loading branch information
nnn-gif committed Oct 4, 2023
1 parent 1ba8c9c commit ec8a6c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion cmd/http/oraclebuilder/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ func (ob *Env) Create(context *gin.Context) {
deviationPermilleFloat, err := strconv.ParseFloat(deviationPermille, 64)
if err != nil {
deviationPermilleFloat = 0.0
log.Errorln("Creating oracle: deviationPermille is empty set to zero", err)

}

Expand Down
6 changes: 3 additions & 3 deletions cmd/http/oraclebuilder/oraclebuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func main() {
signerurl := utils.Getenv("SIGNER_URL", "signer.dia-oracle-feeder:50052")
diaRestURL := utils.Getenv("DIA_REST_URL", "https://api.diadata.org")
diaGraphqlURL := utils.Getenv("DIA_GRAPHQL_URL", "https://api.diadata.org/graphql/query")
postgresqlHost := utils.Getenv("DIA_GRAPHQL_URL", "dia-postgresql.dia-db")
postgresqlHost := utils.Getenv("POSTGRES_HOST_POD", "dia-postgresql.dia-db")

rateLimitOracleCreationString := utils.Getenv("RATE_LIMIT_ORACLE_CREATION", "4")
rateLimitOracleCreation, _ := strconv.ParseInt(rateLimitOracleCreationString, 10, 64)
Expand All @@ -42,15 +42,15 @@ func main() {

routerPath := utils.Getenv("ROUTER_PATH", "/oraclebuilder")

ph := builderUtils.NewPodHelper(oraclebaseimage, oraclenamespace, affinity, signerurl, diaRestURL, diaGraphqlURL)
ph := builderUtils.NewPodHelper(oraclebaseimage, oraclenamespace, affinity, signerurl, diaRestURL, diaGraphqlURL, postgresqlHost)

ring, _ := keyring.Open(keyring.Config{
ServiceName: "oraclebuilder",
Server: k8bridgeurl,
AllowedBackends: []keyring.BackendType{keyring.K8Secret},
})

oracle := NewEnv(relStore, ph, ring, int(rateLimitOracleCreation), postgresqlHost)
oracle := NewEnv(relStore, ph, ring, int(rateLimitOracleCreation))

r.Use(cors.New(cors.Config{
AllowOrigins: []string{"*"},
Expand Down

0 comments on commit ec8a6c0

Please sign in to comment.