diff --git a/app/models/miq_schedule_worker/jobs.rb b/app/models/miq_schedule_worker/jobs.rb index d786e342776..b13e308ed13 100644 --- a/app/models/miq_schedule_worker/jobs.rb +++ b/app/models/miq_schedule_worker/jobs.rb @@ -4,7 +4,7 @@ def vmdb_appliance_log_config end def miq_server_status_update - queue_work(:class_name => "MiqServer", :method_name => "status_update", :server_guid => MiqServer.my_guid, :priority => MiqQueue::HIGH_PRIORITY) + queue_work(:class_name => "MiqServer", :method_name => "status_update", :queue_name => 'miq_server', :server_guid => MiqServer.my_guid, :priority => MiqQueue::HIGH_PRIORITY) end def miq_server_worker_log_status diff --git a/spec/models/miq_schedule_worker/jobs_spec.rb b/spec/models/miq_schedule_worker/jobs_spec.rb index fd28a8b3e8a..4adf8bb9754 100644 --- a/spec/models/miq_schedule_worker/jobs_spec.rb +++ b/spec/models/miq_schedule_worker/jobs_spec.rb @@ -60,4 +60,17 @@ ) end end + + context "with guid, server, zone" do + let!(:guid_server_zone) { EvmSpecHelper.create_guid_miq_server_zone } + let(:guid) { guid_server_zone.first } + let(:zone) { guid_server_zone.last } + + context "queues for miq_server process" do + it "#miq_server_status_update" do + described_class.new.miq_server_status_update + expect(MiqQueue.where(:method_name => "status_update").first).to have_attributes(:queue_name => "miq_server", :server_guid => guid, :zone => zone.name) + end + end + end end