mirror of
https://github.com/rickbarrette/redmine_qbo_lineitems.git
synced 2026-04-02 15:11:58 -04:00
updated ItemSyncService init call
This commit is contained in:
@@ -14,13 +14,8 @@ class ItemSyncJob < ApplicationJob
|
|||||||
|
|
||||||
# Performs a sync of items from QuickBooks Online.
|
# Performs a sync of items from QuickBooks Online.
|
||||||
def perform(full_sync: false, id: nil)
|
def perform(full_sync: false, id: nil)
|
||||||
qbo = QboConnectionService.current!
|
|
||||||
raise "No QBO configuration found" unless qbo
|
|
||||||
|
|
||||||
log "Starting #{full_sync ? 'full' : 'incremental'} sync for item ##{id || 'all'}..."
|
log "Starting #{full_sync ? 'full' : 'incremental'} sync for item ##{id || 'all'}..."
|
||||||
|
service = ItemSyncService.new
|
||||||
service = ItemSyncService.new(qbo: qbo)
|
|
||||||
|
|
||||||
if id.present?
|
if id.present?
|
||||||
service.sync_by_id(id)
|
service.sync_by_id(id)
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user