Files
danbooru/app/jobs/populate_saved_search_job.rb
evazion a07e6667b4 jobs: fix backwards job priorities.
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.
2022-11-30 17:56:10 -06:00

13 lines
293 B
Ruby

# frozen_string_literal: true
# A job that updates a user's saved searches when they do a search for
# `search:all` or `search:<label>`.
class PopulateSavedSearchJob < ApplicationJob
queue_as :default
queue_with_priority -1
def perform(query)
SavedSearch.populate(query)
end
end