diff options
Diffstat (limited to 'lib/oxidized/worker.rb')
-rw-r--r-- | lib/oxidized/worker.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/oxidized/worker.rb b/lib/oxidized/worker.rb index 4173680..692b060 100644 --- a/lib/oxidized/worker.rb +++ b/lib/oxidized/worker.rb @@ -52,7 +52,7 @@ module Oxidized msg += " with message '#{node.msg}'" if node.msg output = node.output.new if output.store node.name, job.config, - :msg => msg, :email => node.email, :user => node.user, :group => node.group + :msg => msg, :email => node.email, :user => node.user, :group => node.group Oxidized.logger.info "Configuration updated for #{node.group}/#{node.name}" Oxidized.Hooks.handle :post_store, :node => node, :job => job, @@ -80,7 +80,11 @@ module Oxidized private def is_cycle_finished? - @jobs_done > 0 && @jobs_done % @nodes.count == 0 + if @jobs_done > @nodes.count + true + else + @jobs_done > 0 && @jobs_done % @nodes.count == 0 + end end def run_done_hook |