Class: Buildbox::Server
- Inherits:
-
Object
- Object
- Buildbox::Server
- Defined in:
- lib/buildbox/server.rb
Constant Summary collapse
- INTERVAL =
5
Instance Method Summary collapse
-
#initialize(config = Buildbox.config, logger = Buildbox.logger) ⇒ Server
constructor
A new instance of Server.
- #start ⇒ Object
Constructor Details
Instance Method Details
#start ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/buildbox/server.rb', line 13 def start Celluloid.logger = @logger agent_access_tokens.each do |access_token| @supervisors << Buildbox::Agent.supervise(access_token) @logger.info "Agent with access token `#{access_token}` has started." end loop do @supervisors.each do |supervisor| supervisor.actors.first.async.process end wait INTERVAL end end |