Skip to content

Commit

Permalink
fix: remove redundant bool
Browse files Browse the repository at this point in the history
  • Loading branch information
VihasMakwana committed Jul 16, 2024
1 parent 142ff3e commit e027831
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions filebeat/input/log/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ type Input struct {
stopOnce sync.Once
fileStateIdentifier file.StateIdentifier
getStatusReporter input.GetStatusReporter
healthy bool
}

// NewInput instantiates a new Log
Expand Down Expand Up @@ -230,7 +229,6 @@ func (p *Input) loadStates(states []file.State) error {

// Run runs the input
func (p *Input) Run() {
p.healthy = true
// Mark it Running for now.
// Any errors encountered in this loop will change state to degraded
p.updateStatus(status.Running, "")
Expand Down Expand Up @@ -294,10 +292,6 @@ func (p *Input) Run() {
p.cleanupStates()
}
}

if p.healthy {
p.updateStatus(status.Running, "finished the scan")
}
}

func (p *Input) cleanupStates() {
Expand Down Expand Up @@ -572,7 +566,6 @@ func (p *Input) scan() {
continue
}
if err != nil {
p.healthy = false
p.updateStatus(status.Degraded, fmt.Sprintf(harvesterErrMsg, newState.Source, err))
logger.Errorf(harvesterErrMsg, newState.Source, err)
}
Expand Down

0 comments on commit e027831

Please sign in to comment.