Commit Graph

9 Commits

Author SHA1 Message Date
Luis Ramos
e52937c113 Use rubocop auto correct to add frozen string literal to all files
This is an unsafe auto corection, we will need to trust our build here
2021-06-17 23:07:26 +01:00
Matt-Yorkley
e1c1574931 Refactor BulkInvoiceService to use ActiveJob
Removes use of #handle_asynchronously, which we need to do elsewhere. Fixes:
BulkInvoiceService#start_pdf_job starts a background process to create a pdf with multiple invoices
      Failure/Error:
        expect do
          service.start_pdf_job [1, 2]
        end.to enqueue_job Delayed::PerformableMethod

        expected to enqueue exactly 1 jobs, but enqueued 0
      # ./spec/services/bulk_invoice_service_spec.rb:8:in `block (3 levels) in <top (required)>'
2020-11-27 14:00:29 +00:00
Maikel Linke
7d53b12baf Preserve sorting by completion date 2020-06-10 10:19:15 +10:00
François Turbelin
6056c1699f Use batches in order to fetch orders 2020-06-09 10:10:34 +02:00
François Turbelin
b2b988b063 Apply new order directly inside service 2020-05-24 14:41:40 +02:00
Maikel Linke
5ee3dbf9f2 Re-use renderer object 2019-02-07 10:12:06 +11:00
Maikel Linke
d97fa60c31 Remove code duplication and test PDF creation 2019-02-06 14:53:05 +11:00
Matt-Yorkley
66ac61f591 Rename background processing method 2019-01-10 09:57:06 +00:00
Matt-Yorkley
4f9f8adcd6 Add Service and remove Job 2019-01-10 09:57:06 +00:00