From 34839bc21f4654f15945c058afb61df837413073 Mon Sep 17 00:00:00 2001 From: takonomura Date: Mon, 29 Jan 2018 16:38:59 +0900 Subject: [PATCH] Fix executor --- lib/autoload/kuroko2/command/executor.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/autoload/kuroko2/command/executor.rb b/lib/autoload/kuroko2/command/executor.rb index a1563b37..35fc8629 100644 --- a/lib/autoload/kuroko2/command/executor.rb +++ b/lib/autoload/kuroko2/command/executor.rb @@ -19,8 +19,8 @@ def initialize elsif worker_id == (Command::Executor.num_workers - 1) Command::Monitor.new(hostname: @hostname, worker_id: worker_id) else - @worker = Worker.where(hostname: @hostname, worker_id: worker_id, queue: @queue).first_or_initialize! - @worker.update_column(:suspendable, true) + @worker = Worker.where(hostname: @hostname, worker_id: worker_id, queue: @queue).first_or_initialize + @worker.update!(suspendable: true) Command::Shell.new(hostname: @hostname, worker_id: worker_id, worker: @worker, queue: @queue) end end