mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-10-04 01:00:44 -04:00
Refactor customer synchronization to use CustomerSyncJob; remove direct sync logic from Customer model for improved background processing
This commit is contained in:
1 parent
208e839e6a
commit
889e9bf31f
3 files changed
+97
-27
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user