summaryrefslogtreecommitdiff
path: root/lib/oxidized
diff options
context:
space:
mode:
authormsil <michael.silas@sohonet.com>2018-06-26 14:09:20 +0100
committerytti <saku@ytti.fi>2018-06-26 16:09:20 +0300
commit23603127362e6f4a7606325501a3ce26ef8317a1 (patch)
tree38e0e94e089313bec52277ff589e6e29b96aee08 /lib/oxidized
parentbde8ed8faffcfb155ec32b76c93485d311bc339c (diff)
adding node group to worker logs
pr #1420
Diffstat (limited to 'lib/oxidized')
-rw-r--r--lib/oxidized/worker.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/oxidized/worker.rb b/lib/oxidized/worker.rb
index 4b9614b..3fc1cee 100644
--- a/lib/oxidized/worker.rb
+++ b/lib/oxidized/worker.rb
@@ -29,7 +29,7 @@ module Oxidized
node = @nodes.get
node.running? ? next : node.running = true
@jobs.push Job.new node
- Oxidized.logger.debug "lib/oxidized/worker.rb: Added #{node.name} to the job queue"
+ Oxidized.logger.debug "lib/oxidized/worker.rb: Added #{node.group}/#{node.name} to the job queue"
end
run_done_hook if is_cycle_finished?
@@ -48,7 +48,7 @@ module Oxidized
process_failure node, job
end
rescue NodeNotFound
- Oxidized.logger.warn "#{node.name} not found, removed while collecting?"
+ Oxidized.logger.warn "#{node.group}/#{node.name} not found, removed while collecting?"
end
private
@@ -57,7 +57,7 @@ module Oxidized
@jobs_done += 1 # needed for :nodes_done hook
Oxidized.Hooks.handle :node_success, node: node,
job: job
- msg = "update #{node.name}"
+ msg = "update #{node.group}/#{node.name}"
msg += " from #{node.from}" if node.from
msg += " with message '#{node.msg}'" if node.msg
output = node.output.new
@@ -73,7 +73,7 @@ module Oxidized
end
def process_failure node, job
- msg = "#{node.name} status #{job.status}"
+ msg = "#{node.group}/#{node.name} status #{job.status}"
if node.retry < Oxidized.config.retries
node.retry += 1
msg += ", retry attempt #{node.retry}"