module Dynflow::Executors
Public Class Methods
run_user_code() { || ... }
click to toggle source
Every time we run a code that can be defined outside of Dynflow, we should wrap it with this method, and we can ensure here to do necessary cleanup, such as cleaning ActiveRecord connections
# File lib/dynflow/executors.rb, line 10 def self.run_user_code yield ensure ::ActiveRecord::Base.clear_active_connections! if defined? ::ActiveRecord end