Skip to content

Commit

Permalink
fix: RedshiftConnector.foreach did not work with new exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
Minero Aoki committed Aug 22, 2017
1 parent 368e973 commit ad94e0f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/redshift_connector/exporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ def Exporter.for_query(**params)

def Exporter.foreach(**params, &block)
exporter = for_query(**params)
bundle = exporter.execute
begin
exporter.execute
exporter.bundle.each_row(&block)
bundle.each_row(&block)
ensure
exporter.bundle.clear
bundle.clear if bundle.respond_to?(:clear)
end
end
end
Expand Down

0 comments on commit ad94e0f

Please sign in to comment.