diff options
Diffstat (limited to 'activejob/lib/active_job/queue_priority.rb')
-rw-r--r-- | activejob/lib/active_job/queue_priority.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activejob/lib/active_job/queue_priority.rb b/activejob/lib/active_job/queue_priority.rb index b02202fcc8..063bccdb01 100644 --- a/activejob/lib/active_job/queue_priority.rb +++ b/activejob/lib/active_job/queue_priority.rb @@ -1,10 +1,12 @@ +# frozen_string_literal: true + module ActiveJob module QueuePriority extend ActiveSupport::Concern # Includes the ability to override the default queue priority. module ClassMethods - mattr_accessor(:default_priority) + mattr_accessor :default_priority # Specifies the priority of the queue to create the job with. # @@ -27,9 +29,7 @@ module ActiveJob end included do - class_attribute :priority, instance_accessor: false - - self.priority = default_priority + class_attribute :priority, instance_accessor: false, default: default_priority end # Returns the priority that the job will be created with |