Refactor estimate synchronization to use EstimateSyncJob; remove direct sync logic from Estimate model for improved background processing

This commit is contained in:
2026-02-27 08:29:52 -05:00
parent 3d37f01bff
commit f32b48296d
3 changed files with 92 additions and 16 deletions

View File

@@ -94,13 +94,13 @@ class QboController < ApplicationController
logger.info "Syncing EVERYTHING"
CustomerSyncJob.perform_later(full_sync: true)
EstimateSyncJob.perform_later(full_sync: true)
# Update info in background
Thread.new do
if Qbo.exists?
Invoice.sync
Employee.sync
Estimate.sync
# Record the last sync time
Qbo.update_time_stamp