StartHelper.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. namespace MySystem
  2. {
  3. public class StartHelper
  4. {
  5. public readonly static StartHelper Instance = new StartHelper();
  6. private StartHelper()
  7. {
  8. }
  9. public void Start()//启动
  10. {
  11. int Environment = Library.ConfigurationManager.EnvironmentFlag; //运行环境(1-开发环境,2-生产环境)
  12. if(Environment == 2)
  13. {
  14. SourceHelper.Instance.Start(); //获取原始数据队列
  15. PushHelper.Instance.Start(); //推送队列
  16. RePushHelper.Instance.Start(); //重新推送队列
  17. AliyunPushHelper.Instance.Start(); //阿里云消息推送
  18. PosPushHelper.Instance.Start(); //推送机具数据
  19. PosRePushHelper.Instance.Start(); //重推送机具数据
  20. // DefaultHelper.Instance.Start(); //队列程序
  21. // ......其他队列程序
  22. }
  23. else
  24. {
  25. // PosPushHelper.Instance.Start(); //推送机具数据
  26. // PosPushHelper.Instance.StartTest(); //推送机具数据
  27. // SourceHelper.Instance.Start(); //获取原始数据队列
  28. // PushHelper.Instance.Start(); //推送队列
  29. }
  30. }
  31. }
  32. }