diff options
author | Saku Ytti <saku@ytti.fi> | 2014-02-23 19:41:38 +0200 |
---|---|---|
committer | Saku Ytti <saku@ytti.fi> | 2014-02-23 19:41:38 +0200 |
commit | d750967f1abd8748b48ac3172fe4016361c3d97e (patch) | |
tree | 9ae6b503304acf79780a07ea998a9570f1d494b5 /lib | |
parent | 8880188001da23a5f0960e3970c4eb9bbd448306 (diff) |
Fix sleep and return ability to not run rest/web
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oxidized/core.rb | 8 |
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 |