Refactor customer synchronization to use CustomerSyncJob; remove direct sync logic from Customer model for improved background processing

This commit is contained in:
2026-02-27 08:00:38 -05:00
parent 208e839e6a
commit 889e9bf31f
3 changed files with 97 additions and 27 deletions

View File

@@ -92,10 +92,12 @@ class QboController < ApplicationController
#
def sync
logger.info "Syncing EVERYTHING"
CustomerSyncJob.perform_later(full_sync: true)
# Update info in background
Thread.new do
if Qbo.exists?
Customer.sync
Invoice.sync
Employee.sync
Estimate.sync