Skip to content

Commit

Permalink
Merge pull request #16384 from jrafanie/do_not_update_spids_when_gett…
Browse files Browse the repository at this point in the history
…ing_message

update_spid! on timeout, not on each message
(cherry picked from commit 9c53f30)

https://bugzilla.redhat.com/show_bug.cgi?id=1509420
  • Loading branch information
gtanzillo authored and simaishi committed Nov 6, 2017
1 parent a923d10 commit ad30373
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/miq_queue_worker_base/runner.rb
Expand Up @@ -83,7 +83,6 @@ def get_message_via_sql
end

def get_message
@worker.update_spid!
if dequeue_method_via_drb? && @worker_monitor_drb
get_message_via_drb
else
Expand All @@ -110,6 +109,7 @@ def deliver_queue_message(msg)
begin
_log.info("#{log_prefix} Reconnecting to DB after timeout error during queue deliver")
ActiveRecord::Base.connection.reconnect!
@worker.update_spid!
rescue => err
do_exit("Exiting worker due to timeout error that could not be recovered from...error: #{err.class.name}: #{err.message}", 1)
end
Expand Down

0 comments on commit ad30373

Please sign in to comment.