Sha256: 50937d2833596f5dfd8dfe3bc91e421defbd22579feaf8bdbdbd63e7ac1f3845
Contents?: true
Size: 787 Bytes
Versions: 5
Compression:
Stored size: 787 Bytes
Contents
# encoding: UTF-8 module Delayed module JobGroups module JobExtensions extend ActiveSupport::Concern included do if Delayed::JobGroups::Compatibility.mass_assignment_security_enabled? attr_accessible :job_group_id, :blocked end belongs_to :job_group, class_name: 'Delayed::JobGroups::JobGroup' class << self # Patch ready_to_run to exclude blocked jobs def ready_to_run_with_blocked_filtering(worker_name, max_run_time) ready_to_run_without_blocked_filtering(worker_name, max_run_time).where(blocked: false) end alias_method_chain :ready_to_run, :blocked_filtering end end def in_job_group? job_group_id.present? end end end end
Version data entries
5 entries across 5 versions & 1 rubygems