Ejemplo n.º 1
0
        public void Run()
        {
            var notLoadedCustomers = _syncOrderRepository.RetrieveShopifyCustomersWithoutSyncs();

            foreach (var shopifyCustomer in notLoadedCustomers)
            {
                if (_jobMonitoringService.DetectCurrentJobInterrupt())
                {
                    return;
                }
                PushCustomer(shopifyCustomer);
            }

            var customersNeedingUpdate = _syncOrderRepository.RetrieveShopifyCustomersNeedingPut();

            foreach (var shopifyCustomer in customersNeedingUpdate)
            {
                if (_jobMonitoringService.DetectCurrentJobInterrupt())
                {
                    return;
                }

                PushCustomer(shopifyCustomer);
            }
        }