Skip to content

Commit

Permalink
Add inline comment for heartbeatUntil default behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Heeyoung Jung committed Jan 22, 2025
1 parent b41751d commit 9e3fe77
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/monitor/sqsevent/asg-lifecycle-event.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ func (m SQSMonitor) asgTerminationToInterruptionEvent(event *EventBridgeEvent, m

interruptionEvent.PreDrainTask = func(interruptionEvent monitor.InterruptionEvent, n node.Node) error {
nthConfig := n.GetNthConfig()
// If only HeartbeatInterval is set, HeartbeatUntil will default to 172800.
if nthConfig.HeartbeatInterval != -1 && nthConfig.HeartbeatUntil != -1 {
go m.checkHeartbeatTimeout(nthConfig.HeartbeatInterval, lifecycleDetail)
go m.SendHeartbeats(nthConfig.HeartbeatInterval, nthConfig.HeartbeatUntil, lifecycleDetail, stopHeartbeatCh)
Expand Down

0 comments on commit 9e3fe77

Please sign in to comment.