Class: Backstage::Job
- Includes:
- HasMBean, Resource, TorqueBoxManaged
- Defined in:
- lib/jobs/models/job.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Resource
#association_chain, included, #resource, #to_hash
Methods included from TorqueBoxManaged
#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
.filter ⇒ Object
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 |