diff options
author | Elvin Efendi <elvin.efendiyev@gmail.com> | 2015-12-13 19:04:57 -0500 |
---|---|---|
committer | Elvin Efendi <elvin.efendiyev@gmail.com> | 2015-12-13 19:04:57 -0500 |
commit | 1fd8f795e40641356d0a4577744c197723b6a3a1 (patch) | |
tree | f505d91af55ee18837d0290f3d9ea7ff8531240b /lib/oxidized/worker.rb | |
parent | 82db9fdd9c135a445a4839e39b245a9965091219 (diff) | |
parent | 1c4f886e883f947b649613a21955929fa6d7e94c (diff) |
Merge pull request #13 from Shopify/refactoring
Refactoring
Diffstat (limited to 'lib/oxidized/worker.rb')
-rw-r--r-- | lib/oxidized/worker.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/oxidized/worker.rb b/lib/oxidized/worker.rb index b36929f..15977e2 100644 --- a/lib/oxidized/worker.rb +++ b/lib/oxidized/worker.rb @@ -14,7 +14,7 @@ module Oxidized ended.each { |job| process job } @jobs.work while @jobs.size < @jobs.want - Log.debug "Jobs #{@jobs.size}, Want: #{@jobs.want}" + Oxidized.logger.debug "Jobs #{@jobs.size}, Want: #{@jobs.want}" # ask for next node in queue non destructive way nextnode = @nodes.first unless nextnode.last.nil? @@ -41,7 +41,7 @@ module Oxidized msg += " with message '#{node.msg}'" if node.msg if node.output.new.store node.name, job.config, :msg => msg, :user => node.user, :group => node.group - Log.info "Configuration updated for #{node.group}/#{node.name}" + Oxidized.logger.info "Configuration updated for #{node.group}/#{node.name}" Oxidized.Hooks.handle :post_store, :node => node, :job => job end @@ -58,10 +58,10 @@ module Oxidized Oxidized.Hooks.handle :node_fail, :node => node, :job => job end - Log.warn msg + Oxidized.logger.warn msg end rescue NodeNotFound - Log.warn "#{node.name} not found, removed while collecting?" + Oxidized.logger.warn "#{node.name} not found, removed while collecting?" end end |