Example #1
0
 public ShopHandler(ProcessShopContext context, ProcessorSettings settings, DbHelper dbHelper)
 {
     _context    = context;
     _settings   = settings;
     _statistics = new ShopProcessingStatistics(context.DownloadInfo, AddMessage, Logger);
     _startDate  = DateTime.Now;
     _dbHelper   = dbHelper;
 }
Example #2
0
        private void DoIndexShop(int shopId, DownloadInfo fileInfo, bool single, bool needSoldOut)
        {
            var processShopContext = new ProcessShopContext(
                $"{shopId}:{(single ? "single" : "all")}",
                shopId,
                fileInfo,
                needSoldOut);

            _context.AddContext(processShopContext);
            Works.AddToQueue(UpdateShop, processShopContext, QueuePriority.Medium, false);
        }
Example #3
0
        private void UpdateShop(ProcessShopContext context)
        {
            var shopHandler = new ShopHandler(context, _settings, Db);

            shopHandler.Process();
        }