コード例 #1
0
def save_snapshots():
    bc_connector = standard_bc_connector()
    vhq_connector = standard_vhq_connector()
    
    bc_snapshot = InventorySnapshot(store="O")
    vhq_snapshot = InventorySnapshot(store="R")
    
    bc_snapshot.save()
    vhq_snapshot.save()
    
    for product in bc_connector.products():
        product.snapshot = bc_snapshot
        product.save()
        
    for product in vhq_connector.products():
        product.snapshot = vhq_snapshot
        product.save()   
コード例 #2
0
def default_syncer():
    return InventorySyncer(standard_bc_connector(), standard_vhq_connector())