app/models/foreman_tasks/task.rb in foreman-tasks-0.7.3 vs app/models/foreman_tasks/task.rb in foreman-tasks-0.7.4
- old
+ new
@@ -21,10 +21,11 @@
scoped_search :on => :id, :complete_value => false
scoped_search :on => :label, :complete_value => true
scoped_search :on => :state, :complete_value => true
scoped_search :on => :result, :complete_value => true
scoped_search :on => :started_at, :complete_value => false
+ scoped_search :on => :ended_at, :complete_value => false
scoped_search :on => :parent_task_id, :complete_value => true
scoped_search :in => :locks, :on => :resource_type, :complete_value => true, :rename => "resource_type", :ext_method => :search_by_generic_resource
scoped_search :in => :locks, :on => :resource_id, :complete_value => false, :rename => "resource_id", :ext_method => :search_by_generic_resource
scoped_search :in => :owners, :on => :id, :complete_value => true, :rename => "owner.id", :ext_method => :search_by_owner
scoped_search :in => :owners, :on => :login, :complete_value => true, :rename => "owner.login", :ext_method => :search_by_owner
@@ -64,12 +65,13 @@
def cli_example
""
end
# returns true if the task is running or waiting to be run
- def pending
+ def pending?
self.state != 'stopped'
end
+ alias_method :pending, :pending?
def resumable?
false
end