summaryrefslogtreecommitdiff
path: root/lib/oxidized/core.rb
blob: 76aa33066facad5e43a9d40620ae42c0c5a2f963 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module Oxidized
  require 'oxidized/log'
  require 'oxidized/config/core'
  require 'oxidized/worker'
  require 'oxidized/nodes'
  require 'oxidized/manager'
  class << self
    def new *args
      Core.new args
    end
  end

  class Core
    def initialize args
      Oxidized.mgr = Manager.new
      nodes        = Nodes.new
      worker       = Worker.new nodes
      loop { worker.work; sleep 1 }
    end
  end
end