Esempio n. 1
0
        private void ScanningLoop(Object source, ElapsedEventArgs args)
        {
            _timer.Stop();

            try
            {
                Log.Logger.Information("Looking for new products");
                List <Product> products = _scraper.GetListOfProducts();
                _sender.EnqueueProducts(products.FindAll(p => p.Type == "bundle" || p.Type == "monthly"));
            }
            catch (Exception e)
            {
                Log.Logger.Error(e.Message);
            }

            _timer.Start();
        }