Esempio n. 1
0
 private void SetRunningCompany()
 {
     if ((DateTime.Now - _lastReportRedis).TotalMinutes > 5)
     {
         _redisWaitCrawler.SetNexFindNew(_companyId, _config.MinHourFindNew);
         _redisWaitCrawler.SetRunningCrawler(_companyId);
         _lastReportRedis = DateTime.Now;
     }
 }
Esempio n. 2
0
 private void ReportToRedis()
 {
     if ((DateTime.Now - _lastPushRunning).TotalMinutes > 5)
     {
         _redisWaitCrawler.SetRunningCrawler(_companyId);
         _redisWaitCrawler.SetNexReload(_companyId, _config.MinHourReload);
         _lastPushRunning = DateTime.Now;
     }
 }
Esempio n. 3
0
 private void ReportToRedis(ReportSessionRunning re)
 {
     _redisWaitCrawler.SetRunningCrawler(re.CompanyId);
     if (re.Type == "Reload")
     {
         _redisWaitCrawler.SetNexReload(re.CompanyId, 1);
     }
     else if (re.Type == "FindNew")
     {
         _redisWaitCrawler.SetNexFindNew(re.CompanyId, 1);
     }
 }