1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-30 19:52:20 +01:00

(quality) reduce deletion delay

This is safe because AccountingLine does not have any delete dependency
This commit is contained in:
Sylvain 2022-12-08 16:48:55 +01:00
parent 9b5cf8842e
commit 05ba27289b

View File

@ -15,7 +15,7 @@ class AccountingWorker
def invoices(invoices_ids)
# clean
AccountingLine.where(invoice_id: ids).destroy_all
AccountingLine.where(invoice_id: ids).delete_all
# build
service = Accounting::AccountingService.new
invoices = Invoice.where(id: invoices_ids)
@ -24,7 +24,7 @@ class AccountingWorker
def all
# clean
AccountingLine.destroy_all
AccountingLine.delete_all
# build
service = Accounting::AccountingService.new
service.build_from_invoices(Invoice.all)