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.
13 lines
265 B
Ruby
13 lines
265 B
Ruby
# frozen_string_literal: true
|
|
|
|
# A job that deletes a user's favorites when they delete their account.
|
|
class DeleteFavoritesJob < ApplicationJob
|
|
queue_as :default
|
|
|
|
def perform(user)
|
|
Post.without_timeout do
|
|
user.favorites.destroy_all
|
|
end
|
|
end
|
|
end
|