lib/rocket_job/plugins/job/state_machine.rb in rocketjob-5.0.0 vs lib/rocket_job/plugins/job/state_machine.rb in rocketjob-5.1.0

- old
+ new

@@ -83,11 +83,11 @@ end end # @formatter:on # By default all jobs are not pausable / resumable - class_attribute(:pausable) + class_attribute(:pausable, instance_predicate: false) self.pausable = false # Define a before and after callback method for each event state_machine_define_event_callbacks(*aasm.state_machine.events.keys) @@ -110,10 +110,10 @@ paused.each(&:resume!) end end # All regular jobs can be paused or resumed whilst queued. - def self.pausable? + def pausable? queued? || paused? || pausable end private