fleet/server/worker
Scott Gress 1ae5167a06
Allow worker to filter queue by job type (#31556)
for #31518 

# Details

This PR updates the jobs package with a new `GetFilteredQueuedJobs`
method which accepts a list of job names to return from the `jobs`
table, rather than returning all jobs matching the other criteria. It
also updates the `worker` package to use this new method instead of
`GetQueuedJobs`.

The purpose of this update is to allow us to add multiple workers which
process different kinds of jobs, while sharing the same `jobs` table and
framework.

I chose to add the new `GetFilteredQueuedJobs` method rather than
updating `GetQueuedJobs` because the latter is used in a bunch of tests
that would need to be updated. `GetQueuedJobs` now calls
`GetFilteredQueuedJobs` with an empty list, which is interpreted as
"return all jobs".

# Checklist for submitter

## Testing

- [X] Added/updated automated tests

- [ ] QA'd all new/changed functionality manually
There shouldn't be any functional change here, but if someone has a Jira
or Zendesk integration set up to easily test with, that'd be good.
2025-08-06 17:22:48 -05:00
..
apple_mdm.go Wait for expected profiles to be sent before releasing device (#31381) 2025-07-31 17:50:57 +02:00
apple_mdm_test.go Updated SQL modes in tests to match production. (#31445) 2025-08-03 08:18:13 +02:00
automation_failer.go Support failing policies integrations (#5973) 2022-06-06 10:41:51 -04:00
automation_failer_test.go 🧹 friday cleanup party: substitute deprecated import of go-kit (#19774) 2024-06-17 10:27:31 -03:00
db_migrations.go MABM bugfix: fix the expected format of the migrated VPP token (#21761) 2024-09-03 13:23:44 -04:00
db_migrations_test.go MABM bugfix: fix the expected format of the migrated VPP token (#21761) 2024-09-03 13:23:44 -04:00
jira.go 🧹 friday cleanup party: substitute deprecated import of go-kit (#19774) 2024-06-17 10:27:31 -03:00
jira_test.go 🧹 friday cleanup party: substitute deprecated import of go-kit (#19774) 2024-06-17 10:27:31 -03:00
macos_setup_assistant.go Remove pending MDM device from Fleet (#23067) 2024-10-24 16:42:30 -05:00
macos_setup_assistant_test.go 30311: Fix race condition in test (#30903) 2025-07-17 10:20:49 -04:00
vpp_verification.go fix issues in setup experience due to VPP verification (#30679) 2025-07-11 14:57:15 -04:00
worker.go Allow worker to filter queue by job type (#31556) 2025-08-06 17:22:48 -05:00
worker_test.go Allow worker to filter queue by job type (#31556) 2025-08-06 17:22:48 -05:00
zendesk.go 🧹 friday cleanup party: substitute deprecated import of go-kit (#19774) 2024-06-17 10:27:31 -03:00
zendesk_test.go 🧹 friday cleanup party: substitute deprecated import of go-kit (#19774) 2024-06-17 10:27:31 -03:00