Use batches in order to fetch orders

This commit is contained in:
François Turbelin
2020-06-09 10:10:34 +02:00
parent b2b988b063
commit 6056c1699f

View File

@@ -8,7 +8,7 @@ class BulkInvoiceService
def start_pdf_job(order_ids)
pdf = CombinePDF.new
orders_from(order_ids).each do |order|
orders_from(order_ids).find_each do |order|
invoice = renderer.render_to_string(order)
pdf << CombinePDF.parse(invoice)