Class: Backstage::Job
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Resource
#association_chain, included, #resource, #to_hash
#app, #app_name, #name, #status
Methods included from HasMBean
#<=>, #full_name, included, #initialize, #mbean_info, #method_missing
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Backstage::HasMBean
Class Method Details
23
24
25
|
# File 'lib/jobs/models/job.rb', line 23
def self.filter
"torquebox.jobs:*"
end
|
.to_hash_attributes ⇒ Object
27
28
29
|
# File 'lib/jobs/models/job.rb', line 27
def self.to_hash_attributes
super + [:name, :app, :app_name, :ruby_class_name, :status, :cron_expression]
end
|
Instance Method Details
#available_actions ⇒ Object
31
32
33
|
# File 'lib/jobs/models/job.rb', line 31
def available_actions
status == 'Started' ? %w{stop} : %w{start}
end
|
31
32
33
34
|
# File 'lib/runtimes/models/job.rb', line 31
def start
super
self
end
|
36
37
38
39
|
# File 'lib/runtimes/models/job.rb', line 36
def stop
super
self
end
|