mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 00:49:03 +00:00
Add a comment explaining ordering when disabling policies (#29961)
For #29958 Adds a comment to address PR comment in prior PR.
This commit is contained in:
parent
eec2c315f3
commit
36e1edc04f
1 changed files with 2 additions and 0 deletions
|
|
@ -811,6 +811,8 @@ func (svc *Service) policyQueriesForHost(ctx context.Context, host *fleet.Host)
|
|||
if !svc.shouldUpdate(policyReportedAt, svc.config.Osquery.PolicyUpdateInterval, host.ID) && !host.RefetchRequested {
|
||||
return nil, false, nil
|
||||
}
|
||||
// This must come after the check above to avoid unnecessary queries to the database. Most
|
||||
// requests from live connected hosts will not reach this point
|
||||
disablePolicies, err := svc.disablePoliciesDuringSetupExperience(ctx, host)
|
||||
if err != nil {
|
||||
return nil, false, ctxerr.Wrap(ctx, err, "check if host is in setup experience")
|
||||
|
|
|
|||
Loading…
Reference in a new issue