lib/grumlin/transaction.rb in grumlin-1.0.3.beta1 vs lib/grumlin/transaction.rb in grumlin-1.0.3

- old
+ new

@@ -1,9 +1,9 @@ # frozen_string_literal: true class Grumlin::Transaction - attr_reader :session_id + attr_reader :session_id, :pool include Console COMMIT = Grumlin::Repository.new.g.step(:tx, :commit) ROLLBACK = Grumlin::Repository.new.g.step(:tx, :rollback) @@ -32,7 +32,9 @@ def finalize(step) @middlewares.call(traversal: step, need_results: false, session_id: @session_id, pool: @pool) + ensure + @pool.close end end