lib/active_job/executing.rb in mission_control-jobs-0.1.1 vs lib/active_job/executing.rb in mission_control-jobs-0.2.0

- old
+ new

@@ -2,13 +2,12 @@ # and related concerns when upstreamed. module ActiveJob::Executing extend ActiveSupport::Concern included do - attr_accessor :raw_data, :position, :finished_at, :blocked_by, :blocked_until, :worker_id, :started_at + attr_accessor :raw_data, :position, :finished_at, :blocked_by, :blocked_until, :worker_id, :started_at, :status attr_reader :serialized_arguments - attr_writer :status thread_cattr_accessor :current_queue_adapter end class_methods do @@ -23,13 +22,11 @@ def discard jobs_relation_for_discarding.discard_job(self) end - def status - return @status if @status.present? - - failed? ? :failed : :pending + def dispatch + ActiveJob.jobs.blocked.dispatch_job(self) end private def jobs_relation_for_discarding case status