summaryrefslogtreecommitdiff
path: root/lib/oxidized/worker.rb
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2017-01-11 21:32:59 +0200
committerNat Morris <nat@netflix.com>2017-02-10 19:29:46 +0000
commit15fc1f0f4698125fb65be3a66906d80a92807a55 (patch)
tree80126c977a4284b75c915b692da649c486015f8f /lib/oxidized/worker.rb
parente6e72296d7e22eaa6fe20fd0b2007d3b58a078a2 (diff)
add one thread when requesting next via API
Diffstat (limited to 'lib/oxidized/worker.rb')
-rw-r--r--lib/oxidized/worker.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/oxidized/worker.rb b/lib/oxidized/worker.rb
index 1952d01..80d65cb 100644
--- a/lib/oxidized/worker.rb
+++ b/lib/oxidized/worker.rb
@@ -3,8 +3,9 @@ module Oxidized
require 'oxidized/jobs'
class Worker
def initialize nodes
- @nodes = nodes
- @jobs = Jobs.new(Oxidized.config.threads, Oxidized.config.interval, @nodes)
+ @nodes = nodes
+ @jobs = Jobs.new(Oxidized.config.threads, Oxidized.config.interval, @nodes)
+ @nodes.jobs = @jobs
Thread.abort_on_exception = true
end