app/models/foreman_tasks/task.rb in foreman-tasks-0.5.7 vs app/models/foreman_tasks/task.rb in foreman-tasks-0.6.0

- old
+ new

@@ -60,9 +60,17 @@ # returns true if the task is running or waiting to be run def pending self.state != 'stopped' end + def resumable? + false + end + + def paused? + self.state == 'paused' + end + def self.search_by_generic_resource(key, operator, value) key_name = self.connection.quote_column_name(key.sub(/^.*\./,'')) condition = sanitize_sql_for_conditions(["foreman_tasks_locks.#{key_name} #{operator} ?", value]) return {:conditions => condition, :joins => :locks }