From 079d10c20c45eb2e4d4c0fa62428410a091fd8f9 Mon Sep 17 00:00:00 2001 From: Yuri Rudman Date: Mon, 19 Feb 2018 07:55:24 -0500 Subject: [PATCH] use 'miq_task_id' instead of miq_task when checking if there is task linked to queue item --- app/models/miq_queue.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/miq_queue.rb b/app/models/miq_queue.rb index 4b9f4cb16b7..cfac74ac202 100644 --- a/app/models/miq_queue.rb +++ b/app/models/miq_queue.rb @@ -544,9 +544,9 @@ def self.get_worker(task_id) private def activate_miq_task(args) - MiqTask.update_status(miq_task_id, MiqTask::STATE_ACTIVE, MiqTask::STATUS_OK, "Task starting") if miq_task - pars = args.first - pars[:miq_task_id] = miq_task_id if pars.kind_of?(Hash) + MiqTask.update_status(miq_task_id, MiqTask::STATE_ACTIVE, MiqTask::STATUS_OK, "Task starting") if miq_task_id + params = args.first + params[:miq_task_id] = miq_task_id if params.kind_of?(Hash) args end