You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: database_middleware.rb
    path of file: ./repos/multiwoven/server/app/temporal/middlewares
    
    the code of the file until where you have to start completion: # frozen_string_literal:
    
    def call(_metadata)
      ActiveRecord::Base.connection_pool.with_connection do
        yield
      ensure
        ActiveRecord::Base.clear_active_connections!
        ActiveRecord::Base.connection.close
      end
    end