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
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/buildbox/server.rb', line 10 def start loop do @config.check @config.reload agent_access_tokens.each do |access_token| Buildbox::Agent.new(access_token, api).work end @logger.info "Sleeping for #{INTERVAL} seconds" sleep INTERVAL end end |