From d750967f1abd8748b48ac3172fe4016361c3d97e Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Sun, 23 Feb 2014 19:41:38 +0200 Subject: Fix sleep and return ability to not run rest/web --- lib/oxidized/core.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/oxidized') 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 -- cgit v1.2.1