Fix bug where jobs had the opposite of the intended priority. Populating saved searches had the
highest priority, while processing uploads had the lowest priority.
Caused by Delayed::Job and GoodJob having opposite interpretations of job priorities. In
Delayed::Job, lower numbers had higher priority, while in GoodJob, higher numbers have higher
priority. This was missed when migrating from Delayed::Job to GoodJob.
Lower the priority of the populate saved search job. This is so that
large numbers of saved searches don't overwhelm the job queue and
prevent higher priority jobs from running.
* Fix tests to run the searches for real instead of mocking everything out.
* Fix SavedSearch.populate to only use the read only database in
production because in breaks things in tests. Specifically:
the posts get created in one db connection but searched for in
another, but the second transaction doesn't see the uncommitted posts
in the first transaction, so the search doesn't work.