UpdateJob.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Diagnostics;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading;
  7. using System.Threading.Tasks;
  8. using FCS.Common;
  9. using FCS.Crawler.Basketball;
  10. using FCS.Crawler.ZCLotteryAgainst;
  11. using FCS.Crawler.ZCLotteryAsianDish;
  12. using FCS.Crawler.ZCLotteryGames;
  13. using FCS.Crawler.ZCLotteryGrouping;
  14. using FCS.Crawler.ZCLotteryIP;
  15. using FCS.Crawler.ZCLotteryMatchs;
  16. using FCS.Crawler.ZCLotteryScore;
  17. using FCS.Crawler.ZCLotterySizeIndex;
  18. using FCS.Interface;
  19. using FCS.Models;
  20. using Quartz;
  21. namespace FCS.Crawler
  22. {
  23. public class UpdateJob : CommonJob, IJob
  24. {
  25. public UpdateJob()
  26. {
  27. logName = "UpdateJob";
  28. }
  29. public void Execute(IJobExecutionContext context)
  30. {
  31. Config = CommonHelper.GetConfigFromDataMap(context.JobDetail.JobDataMap);
  32. Click();
  33. }
  34. public void Click()
  35. {
  36. ThreadPool.SetMaxThreads(200, 200);
  37. CommonHelper.LogBD("Update开始", logName);
  38. new IPJob().GetIP();
  39. Task.Run(() =>
  40. {
  41. new FootballMatchJob().GetAll();
  42. new GroupingJob().Click();
  43. });
  44. Task.Run(() =>
  45. {
  46. new B_GroupingJob().Click();
  47. new B_GamesJob().Click();
  48. new B_PlayersStatisticsJob().Click();
  49. });
  50. CommonHelper.LogBD("Update结束", logName);
  51. }
  52. }
  53. }