app/models/scheduled_task/status.rb in tasks_scheduler-0.1.0 vs app/models/scheduled_task/status.rb in tasks_scheduler-0.2.0

- old
+ new

@@ -5,9 +5,13 @@ return STATUS_RUNNING if running? return STATUS_WAITING if waiting? last_fail_status.present? ? last_fail_status : STATUS_FAILED end + def failed? + [STATUS_FAILED, STATUS_ABORTED, STATUS_TIMEOUT].include?(status) + end + def running? last_run_start.present? end def waiting?