当使用ActiveJob来排队作业时,如何设置延迟作业的优先级?
class GuestsCleanupJob < ApplicationJob
queue_as :high_priority
def perform(*guests)
# Do something later
end
end
MyJob.set(queue: :another_queue).perform_later(record)
https://guides.rubyonrails.org/active_job_basics.html - aoh