Skip to content

Commit

Permalink
Allow symbols to load from DRb threads
Browse files Browse the repository at this point in the history
https://bugzilla.redhat.com/show_bug.cgi?id=1354054

use ActiveSupport::Dependencies.interlock.permit_concurrent_loads
to allow for Automate Methods/Drb to load symbols
  • Loading branch information
mkanoor committed Jul 25, 2016
1 parent 3991cd5 commit a1656fc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/miq_automation_engine/engine/miq_ae_engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ def self.deliver_queue(args, options = {})
end

def self.deliver(*args)
@deliver_mutex.synchronize { deliver_block(*args) }
# This was added because in RAILS 5 PUMA sends multiple requests
# to the same processa and our DRb server implementation for Automate
# Methods is not thread safe. The permit_concurrent_loads allows the
# DRb requests which run in different threads to load symbols.
ActiveSupport::Dependencies.interlock.permit_concurrent_loads do
@deliver_mutex.synchronize { deliver_block(*args) }
end
end

def self.deliver_block(*args)
Expand Down

0 comments on commit a1656fc

Please sign in to comment.