public override bool TryFetchItem(out IEnumerable <ProductPrice> item)
        {
            try
            {
                wincorPriceStatusUpdate();

                _logger.Debug($"Trying to fetch wincor prices");
                item = _productPriceService.getNewPrices(1, -1, 1);
                _logger.Debug($"Fetch complete.");
                return(item.Any());
            }
            catch (Exception ex)
            {
                _logger.Error("Trying to fetch wincor prices", ex);
                // Wait a little to prevent high CPU situations
                _cancelSpinEvent.WaitOne(10000);
                item = null;
                return(false);
            }
        }
Beispiel #2
0
 public IEnumerable <ProductPrice> GetCashRegisterSalePrices(int storeId)
 {
     return(_productPriceService.getNewPrices(1, storeId, 0));
 }