Skip to content

Commit

Permalink
adding a sleep to check logs before fatel
Browse files Browse the repository at this point in the history
  • Loading branch information
vijeyash1 committed Aug 24, 2023
1 parent 5e88d55 commit 451890e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions agent/container/pkg/clients/nats_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ func NewNATSContext(conf *config.Config) (*NATSContext, error) {
tlsConfig, err := GetTlsConfig()
if err != nil {
log.Println("error while getting tls config ", err)
time.Sleep(time.Minute * 30)
log.Fatal("error while getting tls config ", err)
}
conn, err := nats.Connect(conf.NatsAddress,
nats.Name("Github metrics"),
Expand Down
2 changes: 2 additions & 0 deletions agent/git/pkg/clients/nats_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ func NewNATSContext(conf *config.Config) (*NATSContext, error) {
certPEM, keyPEM, caCertPEM, err := ReadMtlsCerts(certFilePath, keyFilePath, caFilePath)
if err != nil {
log.Printf("Error reading MTLS certs: %v", err)
time.Sleep(time.Minute * 30)
log.Fatal("error while getting tls config ", err)
}
cert, err := tls.X509KeyPair(certPEM, keyPEM)
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions agent/kubviz/k8smetrics_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ func main() {
tlsConfig, err := GetTlsConfig()
if err != nil {
log.Println("error while getting tls config ", err)
time.Sleep(time.Minute * 30)
log.Fatal("error while getting tls config ", err)
}
// connecting with nats ...
nc, err := nats.Connect(
Expand Down
2 changes: 2 additions & 0 deletions client/pkg/clients/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ func NewNATSContext(conf *config.Config, dbClient clickhouse.DBInterface) (*NATS
tlsConfig, err := GetTlsConfig()
if err != nil {
log.Println("error while getting tls config ", err)
time.Sleep(time.Minute * 30)
log.Fatal("error while getting tls config ", err)
}
conn, err := nats.Connect(conf.NatsAddress,
nats.Name("Github metrics"),
Expand Down

0 comments on commit 451890e

Please sign in to comment.