Exemplo n.º 1
0
 public WorkerReload(int indexThread, CancellationToken cancellationToken, string session,
                     PublisherDesciption publiserDesciption)
 {
     Init();
     _indexThread        = indexThread;
     TokenCrawler        = cancellationToken;
     _session            = session;
     _publiserDesciption = publiserDesciption;
 }
Exemplo n.º 2
0
 private void Init()
 {
     _redisDesHash              = CacheProductDesciptioHash.Instance();
     _jobClientLogChangePrice   = new MqLogChangePrice();
     _jobClientLogChangeProduct = MQLogChangeProduct.Instance();
     _dicDuplicate              = new Dictionary <long, long>();
     _dicCacheProduct           = new Dictionary <long, ProductCache>();
     _linksQueue             = new Queue <NSCrawler.Job>();
     _productAdapter         = new ProductAdapter(new SqlDb(Server.ConnectionString));
     _redisWaitCrawler       = RedisCompanyWaitCrawler.Instance();
     _redisProduct           = RedisCacheProductInfo.Instance();
     _redisProductLastUpdate = RedisLastUpdateProduct.Instance();
     _publiserDesciption     = new PublisherDesciption();
 }
Exemplo n.º 3
0
 public WorkerReload(PublisherDesciption publiserDesciption)
 {
     _publiserDesciption = publiserDesciption;
     Init();
 }