summaryrefslogtreecommitdiff
path: root/lib/oxidized
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized')
-rw-r--r--lib/oxidized/node.rb4
-rw-r--r--lib/oxidized/nodes.rb1
-rw-r--r--lib/oxidized/worker.rb2
3 files changed, 4 insertions, 3 deletions
diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb
index 4f9ae54..2b15d4e 100644
--- a/lib/oxidized/node.rb
+++ b/lib/oxidized/node.rb
@@ -6,7 +6,7 @@ module Oxidized
class ModelNotFound < OxidizedError; end
class Node
attr_reader :name, :ip, :model, :input, :output, :group, :auth, :prompt, :vars, :last, :repo
- attr_accessor :running, :user, :msg, :from, :stats, :retry
+ attr_accessor :running, :user, :email, :msg, :from, :stats, :retry
alias :running? :running
def initialize opt
@@ -121,7 +121,7 @@ module Oxidized
end
def reset
- @user = @msg = @from = nil
+ @user = @email = @msg = @from = nil
@retry = 0
end
diff --git a/lib/oxidized/nodes.rb b/lib/oxidized/nodes.rb
index 6751c7a..3f84e15 100644
--- a/lib/oxidized/nodes.rb
+++ b/lib/oxidized/nodes.rb
@@ -68,6 +68,7 @@ module Oxidized
with_lock do
n = del node
n.user = opt['user']
+ n.email = opt['email']
n.msg = opt['msg']
n.from = opt['from']
# set last job to nil so that the node is picked for immediate update
diff --git a/lib/oxidized/worker.rb b/lib/oxidized/worker.rb
index dfe9803..4173680 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, :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,