From 6bcc28c09639216f70386bf988191db38926dbc7 Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Fri, 31 Jan 2020 10:41:35 -0500 Subject: [PATCH] Remove process_messages_from_server from MiqWorker The process_messages_from_server method was last used by the MiqVimBrokerWorker and can be removed now. --- app/models/miq_worker/runner.rb | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/app/models/miq_worker/runner.rb b/app/models/miq_worker/runner.rb index 70fb3542295..7de832b024f 100644 --- a/app/models/miq_worker/runner.rb +++ b/app/models/miq_worker/runner.rb @@ -288,8 +288,6 @@ def heartbeat _log.info("#{log_prefix} Synchronizing configuration complete...") end - process_messages_from_server unless MiqEnvironment::Command.is_podified? - @last_hb = now do_heartbeat_work rescue SystemExit, SignalException @@ -298,15 +296,6 @@ def heartbeat do_exit("Error heartbeating because #{err.class.name}: #{err.message}\n#{err.backtrace.join('\n')}", 1) end - def process_messages_from_server - worker_monitor_drb.register_worker(@worker.pid, @worker.class.name, @worker.queue_name) - worker_monitor_drb.worker_get_messages(@worker.pid).each do |msg, *args| - process_message(msg, *args) - end - rescue DRb::DRbError => err - do_exit("Error processing messages from MiqServer because #{err.class.name}: #{err.message}", 1) - end - def heartbeat_to_file(timeout = nil) # Disable heartbeat check. Useful if a worker is running in isolation # without the oversight of MiqServer::WorkerManagement