UpdateJob.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. while (!CommonHelper.ThreadsFinsh())
  51. continue;
  52. CommonHelper.LogBD("Update结束", logName);
  53. }
  54. }
  55. }