1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-04-12 02:02:31 +02: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) def invoices(invoices_ids)
# clean # clean
AccountingLine.where(invoice_id: ids).destroy_all AccountingLine.where(invoice_id: ids).delete_all
# build # build
service = Accounting::AccountingService.new service = Accounting::AccountingService.new
invoices = Invoice.where(id: invoices_ids) invoices = Invoice.where(id: invoices_ids)
@ -24,7 +24,7 @@ class AccountingWorker
def all def all
# clean # clean
AccountingLine.destroy_all AccountingLine.delete_all
# build # build
service = Accounting::AccountingService.new service = Accounting::AccountingService.new
service.build_from_invoices(Invoice.all) service.build_from_invoices(Invoice.all)