fleet/changes/36644-randomize-apns-query
Magnus Jensen 316adb4cd0
randomize APNS query (#38222)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #36644 

Randomizes the query so we get a new set of 500 every time, and also
improves the index by adding a priority where clause.

It should fine handle up towards 10.000 filtered entries before becoming
slow, and at most we have seen 2k with a customer.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

## Testing

- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually
2026-01-13 13:06:33 -05:00

1 line
No EOL
82 B
Text

- Randomized APNS query to ensure all pending Apple hosts gets a push notification