Update_RealTimeJob.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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.ZCLotteryAgainst;
  10. using FCS.Crawler.ZCLotteryAsianDish;
  11. using FCS.Crawler.ZCLotteryGames;
  12. using FCS.Crawler.ZCLotteryGrouping;
  13. using FCS.Crawler.ZCLotteryIP;
  14. using FCS.Crawler.ZCLotteryMatchs;
  15. using FCS.Crawler.ZCLotteryScore;
  16. using FCS.Crawler.ZCLotterySizeIndex;
  17. using FCS.Crawler.ZCLotteryTeam;
  18. using FCS.Interface;
  19. using FCS.Models;
  20. using Quartz;
  21. namespace FCS.Crawler
  22. {
  23. public class Update_RealTimeJob : CommonJob, IJob
  24. {
  25. public Update_RealTimeJob()
  26. {
  27. logName = "Update_RealTimeJob";
  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_RealTime", logName);
  38. new GamesJob().Click();
  39. CommonHelper.LogBD("比赛完成", logName);
  40. taskList.Add(Task.Run(() =>
  41. {
  42. new GamesDetailsJob().Click();
  43. CommonHelper.LogBD("GamesDetailsJob完成", logName);
  44. }));
  45. taskList.Add(Task.Run(() =>
  46. {
  47. new ScoreJob().Click();
  48. CommonHelper.LogBD("ScoreJob完成", logName);
  49. }));
  50. taskList.Add(Task.Run(() =>
  51. {
  52. new AgainstJob().Click();
  53. CommonHelper.LogBD("AgainstJob完成", logName);
  54. }));
  55. Task.WaitAll(taskList.ToArray());
  56. CommonHelper.LogBD("开始赔率", logName);
  57. ThreadPool.SetMaxThreads(50, 50);
  58. new Update_RealTimeJobToDayOne().Click();
  59. CommonHelper.LogBD("结束Update_RealTime", logName);
  60. }
  61. }
  62. }