summaryrefslogtreecommitdiff
path: root/lib/oxidized
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2014-02-23 19:41:38 +0200
committerSaku Ytti <saku@ytti.fi>2014-02-23 19:41:38 +0200
commitd750967f1abd8748b48ac3172fe4016361c3d97e (patch)
tree9ae6b503304acf79780a07ea998a9570f1d494b5 /lib/oxidized
parent8880188001da23a5f0960e3970c4eb9bbd448306 (diff)
Fix sleep and return ability to not run rest/web
Diffstat (limited to 'lib/oxidized')
-rw-r--r--lib/oxidized/core.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/oxidized/core.rb b/lib/oxidized/core.rb
index 70e9e42..14de9ab 100644
--- a/lib/oxidized/core.rb
+++ b/lib/oxidized/core.rb
@@ -16,8 +16,10 @@ module Oxidized
Oxidized.mgr = Manager.new
nodes = Nodes.new
@worker = Worker.new nodes
- @rest = API::Web.new nodes, CFG.rest if CFG.rest
- @rest.run
+ if CFG.rest
+ @rest = API::Web.new nodes, CFG.rest
+ @rest.run
+ end
run
end
@@ -26,7 +28,7 @@ module Oxidized
def run
while true
@worker.work
- Config::Sleep
+ sleep Config::Sleep
end
end
end