UpdateJob.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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.ZCLotteryOdds;
  17. using FCS.Crawler.ZCLotteryScore;
  18. using FCS.Crawler.ZCLotterySizeIndex;
  19. using FCS.Interface;
  20. using FCS.Models;
  21. using Quartz;
  22. namespace FCS.Crawler
  23. {
  24. public class UpdateJob : CommonJob, IJob
  25. {
  26. public UpdateJob()
  27. {
  28. logName = "UpdateJob";
  29. }
  30. public void Execute(IJobExecutionContext context)
  31. {
  32. Config = CommonHelper.GetConfigFromDataMap(context.JobDetail.JobDataMap);
  33. Click();
  34. }
  35. public void Click()
  36. {
  37. ThreadPool.SetMaxThreads(200, 200);
  38. CommonHelper.LogBD("Update开始", logName);
  39. new IPJob().GetIP();
  40. Task.Run(() =>
  41. {
  42. new FootballMatchJob().GetAll();
  43. new GroupingJob().Click();
  44. });
  45. Task.Run(() =>
  46. {
  47. new B_GroupingJob().Click();
  48. new B_GamesJob().Click();
  49. new B_PlayersStatisticsJob().Click();
  50. });
  51. CommonHelper.LogBD("Update结束", logName);
  52. }
  53. }
  54. }