Skip to content

Commit

Permalink
Add note on lastRun not getting updated
Browse files Browse the repository at this point in the history
  • Loading branch information
dantecatalfamo committed Dec 19, 2024
1 parent 38dd292 commit 32d654d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/osquery-perf/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,12 @@ func (a *agent) runLoop(i int, onlyAlreadyEnrolled bool) {
now := time.Now().Unix()
prevCount := a.countBuffered()

// NOTE The goroutine that pulls in new configurations
// MAY replace this map if it happens to run at the
// exact same time. The result would be. The result
// would be that the query lastRun does not get
// updated and cause the query to run more times than
// expected.
queryData := a.scheduledQueryData
queryData.Range(func(key, value any) bool {
queryName := key.(string)
Expand Down

0 comments on commit 32d654d

Please sign in to comment.