public ShopHandler(ProcessShopContext context, ProcessorSettings settings, DbHelper dbHelper) { _context = context; _settings = settings; _statistics = new ShopProcessingStatistics(context.DownloadInfo, AddMessage, Logger); _startDate = DateTime.Now; _dbHelper = dbHelper; }
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); }
private void UpdateShop(ProcessShopContext context) { var shopHandler = new ShopHandler(context, _settings, Db); shopHandler.Process(); }