From 15fc1f0f4698125fb65be3a66906d80a92807a55 Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Wed, 11 Jan 2017 21:32:59 +0200 Subject: add one thread when requesting next via API --- lib/oxidized/worker.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/oxidized/worker.rb') 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 -- cgit v1.2.1