lib/lucid_async/active_record/task.rb
def _close_connection
      if LucidAsync.active_record?
        ::ActiveRecord::Base.connection.close
      end
    end
# Need to close thread local ActiveRecord connections to prevent dead
# connections blocking on the connection pool.
#
#     async { SomeAPI.product( 123 ).save }
#
Need to close thread local ActiveRecord connections to prevent dead
connections blocking on the connection pool.

async { SomeAPI.product( 123 ).save }
Need to close thread local ActiveRecord connections to prevent dead connections blocking on the connection pool . async { SomeAPI . product ( 123 ) . save }
def _close_connection
      if LucidAsync.active_record?
        ::ActiveRecord::Base.connection.close
      end
    end
def _close_connection if LucidAsync . active_record? :: ActiveRecord :: Base . connection . close end end
Need to close thread local ActiveRecord connections to prevent dead
connections blocking on the connection pool.
Need to close thread local ActiveRecord connections to prevent dead connections blocking on the connection pool .