Class: BatchManager::ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- BatchManager::ApplicationController
- Defined in:
- app/controllers/batch_manager/application_controller.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#local_resque_worker? ⇒ Boolean
16 17 18 |
# File 'app/controllers/batch_manager/application_controller.rb', line 16 def local_resque_worker? Socket.gethostname == resque_worker_hostname end |
#resque_supported? ⇒ Boolean
7 8 9 10 11 12 13 14 |
# File 'app/controllers/batch_manager/application_controller.rb', line 7 def resque_supported? begin require 'resque' defined?(Resque) && resque_worker rescue LoadError false end end |
#resque_worker_hostname ⇒ Object
20 21 22 |
# File 'app/controllers/batch_manager/application_controller.rb', line 20 def resque_worker_hostname resque_worker.id.split(':')[0] end |