Skip to content

Commit

Permalink
Get ruptela source from env
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinJoiner committed Oct 23, 2024
1 parent 8fefa6b commit b949599
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions charts/telemetry-api/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ env:
IDENTITY_API_REQUEST_TIMEOUT_SECONDS: 5
DEVICE_LAST_SEEN_BIN_HOURS: 3
POMVC_BUCKET: dimo-network-pomvc-prod
RUPTELA_CONNECTION_ID: "0x3A6603E1065C9b3142403b1b7e349a6Ae936E819"
ingress:
enabled: true
className: nginx
Expand Down
1 change: 1 addition & 0 deletions charts/telemetry-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ env:
IDENTITY_API_URL: https://identity-api.dev.dimo.zone/query
IDENTITY_API_REQUEST_TIMEOUT_SECONDS: 5
DEVICE_LAST_SEEN_BIN_HOURS: 3
RUPTELA_CONNECTION_ID: "0x4Dc84a226102c08e911A5159e165e616e3A877A8"
service:
type: ClusterIP
ports:
Expand Down
3 changes: 3 additions & 0 deletions internal/config/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@ type Settings struct {
IdentityAPIURL string `yaml:"IDENTITY_API_URL"`
IdentityAPIReqTimeoutSeconds int `yaml:"IDENTITY_API_REQUEST_TIMEOUT_SECONDS"`
DeviceLastSeenBinHrs int64 `yaml:"DEVICE_LAST_SEEN_BIN_HOURS"`

// TODO (kevin): We should pull this from the chain when we have the ability to do so.
RuptelaConnectionId string `yaml:"RUPTELA_CONNECTION_ID"`
}
1 change: 1 addition & 0 deletions internal/service/ch/ch.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func NewService(settings config.Settings) (*Service, error) {
if err != nil {
return nil, fmt.Errorf("failed to ping clickhouse: %w", err)
}
SourceTranslations["ruptela"] = settings.RuptelaConnectionId
return &Service{conn: conn, lastSeenBucketHrs: settings.DeviceLastSeenBinHrs}, nil
}

Expand Down
1 change: 0 additions & 1 deletion internal/service/ch/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ var SourceTranslations = map[string]string{
"tesla": "dimo/integration/26A5Dk3vvvQutjSyF0Jka2DP5lg",
"autopi": "dimo/integration/27qftVRWQYpVDcO5DltO5Ojbjxk",
"smartcar": "dimo/integration/22N2xaPOq2WW2gAHBHd0Ikn4Zob",
"ruptela": "dimo/integration/2lcaMFuCO0HJIUfdq8o780Kx5n3",
}

var dialect = drivers.Dialect{
Expand Down

0 comments on commit b949599

Please sign in to comment.