summaryrefslogtreecommitdiff
path: root/lib/oxidized/nodes.rb
diff options
context:
space:
mode:
authorNat Morris <nat@nuqe.net>2017-02-13 12:49:51 +0000
committerGitHub <noreply@github.com>2017-02-13 12:49:51 +0000
commitc83c7e87d8e56739aad37a1fa994a63896d2f684 (patch)
treefbc9ab48eea893dc1ffec5eedeb5905933d67e8f /lib/oxidized/nodes.rb
parente6e72296d7e22eaa6fe20fd0b2007d3b58a078a2 (diff)
parent3d3a308faae69572ac17fd6c44ac726d0a958cf9 (diff)
Merge pull request #3 from ytti/master
Bring Netflix fork in sync with upstream
Diffstat (limited to 'lib/oxidized/nodes.rb')
-rw-r--r--lib/oxidized/nodes.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/oxidized/nodes.rb b/lib/oxidized/nodes.rb
index f5a1ad0..6751c7a 100644
--- a/lib/oxidized/nodes.rb
+++ b/lib/oxidized/nodes.rb
@@ -4,7 +4,7 @@ module Oxidized
class Oxidized::NotSupported < OxidizedError; end
class Oxidized::NodeNotFound < OxidizedError; end
class Nodes < Array
- attr_accessor :source
+ attr_accessor :source, :jobs
alias :put :unshift
def load node_want=nil
with_lock do
@@ -73,6 +73,7 @@ module Oxidized
# set last job to nil so that the node is picked for immediate update
n.last = nil
put n
+ jobs.want += 1 if Oxidized.config.next_adds_job?
end
end
end