Skip to content

Commit

Permalink
(fix) give more information about heartbeat
Browse files Browse the repository at this point in the history
  • Loading branch information
tphoney committed Sep 27, 2024
1 parent 737a96c commit 6cdfffe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ var rootCmd = &cobra.Command{
}
} else if natsJWT != "" || natsNKeySeed != "" {
natsTokenClient, err = createTokenClient(natsJWT, natsNKeySeed)
log.Info("Using NATS authentication, no heartbeat will be sent")

if err != nil {
log.WithError(err).Fatal("Error validating NATS authentication info")
Expand Down
5 changes: 4 additions & 1 deletion proc/proc.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,10 @@ func InitializeAwsSourceEngine(ctx context.Context, name string, version string,
startupErrorMutex.Lock()
startupError = err
startupErrorMutex.Unlock()
_ = e.SendHeartbeat(ctx) // Send the error immediately
brokenHeart := e.SendHeartbeat(ctx) // Send the error immediately
if brokenHeart != nil {
log.WithError(brokenHeart).Error("Error sending heartbeat")
}

if err != nil {
log.WithError(err).Debug("Error initializing sources")
Expand Down

0 comments on commit 6cdfffe

Please sign in to comment.