Class: DTR::Agent::Brain
- Inherits:
-
ProcessRoot
- Object
- ProcessRoot
- DTR::Agent::Brain
- Includes:
- DTR::Adapter::Follower
- Defined in:
- lib/dtr/agent/brain.rb
Instance Method Summary collapse
- #hypnotize ⇒ Object
- #hypnotize_once ⇒ Object
-
#initialize ⇒ Brain
constructor
A new instance of Brain.
Methods included from DTR::Adapter::Follower
Constructor Details
#initialize ⇒ Brain
Returns a new instance of Brain.
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/dtr/agent/brain.rb', line 21 def initialize super raise 'No runner? What can I do for you?' if DTR.configuration.agent_runners.blank? DTR.info {""} DTR.info {"--------------------beautiful line--------------------------"} DTR.info {"=> Agent environment setup command: #{DTR.configuration.agent_env_setup_cmd}"} DTR.info {"=> Runners: #{DTR.configuration.agent_runners.join(', ')}"} DTR.info {"=> Listening port: #{DTR.configuration.agent_listen_port}"} DTR.info {"=> Group: #{DTR.configuration.group}"} DTR.info {"=> Dir.pwd: #{Dir.pwd}"} DTR.info {"=> Follower listen heartbeat timeout: #{DTR.configuration.follower_listen_heartbeat_timeout}"} end |
Instance Method Details
#hypnotize ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/dtr/agent/brain.rb', line 34 def hypnotize with_relaxation do loop do do_once end end end |
#hypnotize_once ⇒ Object
42 43 44 45 46 |
# File 'lib/dtr/agent/brain.rb', line 42 def hypnotize_once with_relaxation do do_once end end |