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:
parent
9b5cf8842e
commit
05ba27289b
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user