From 32d8b5e0f09f44bece969c40cbb7fd1fc3aab008 Mon Sep 17 00:00:00 2001 From: Julian Cheal Date: Tue, 31 Oct 2017 11:37:20 +0000 Subject: [PATCH] Find_by_queue_name expects a string as queue_name. Multi EMS Workers' queue_names are arrays. to_s converts the array to a string. --- app/models/mixins/per_ems_worker_mixin.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/mixins/per_ems_worker_mixin.rb b/app/models/mixins/per_ems_worker_mixin.rb index 9238cf735ba..cb0ac6c55f1 100644 --- a/app/models/mixins/per_ems_worker_mixin.rb +++ b/app/models/mixins/per_ems_worker_mixin.rb @@ -70,7 +70,7 @@ def start_worker_for_ems(ems_or_queue_name) def stop_worker_for_ems(ems_or_queue_name) wpid = nil - find_by_queue_name(queue_name_for_ems(ems_or_queue_name)).each do |w| + find_by_queue_name(queue_name_for_ems(ems_or_queue_name).to_s).each do |w| next unless w.status == MiqWorker::STATUS_STARTED wpid = w.pid w.stop