lib/tasque/task.rb in tasque-0.0.9 vs lib/tasque/task.rb in tasque-0.1.0

- old
+ new

@@ -110,18 +110,16 @@ self.update_columns progress: val, updated_at: Time.now @last_progress_at = Time.now @last_progress_val = val notify end - end - - state :processing, :cancel do + def error!(task_error) raise Tasque::TaskError.new(self, task_error) end end - state :processing, :error, :cancel do + state :processing, :error do attr_accessor :error def error? !@error.nil? end