Skip to content

Commit

Permalink
Merge pull request #633 from overmindtech/heartbeart_quality_of_life
Browse files Browse the repository at this point in the history
(fix) give more information about heartbeat
  • Loading branch information
dylanratcliffe authored Sep 28, 2024
2 parents 737a96c + 6cdfffe commit ab5978f
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 ab5978f

Please sign in to comment.