Browse Source

删除推送机具队列

lcl 1 year ago
parent
commit
9fd6fa0c58
1 changed files with 0 additions and 78 deletions
  1. 0 78
      AppStart/Service/KxsPosPushService.cs

+ 0 - 78
AppStart/Service/KxsPosPushService.cs

@@ -1,78 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Library;
-using System.Linq;
-using System.Threading;
-using RabbitMQ.Client;
-using System.Text;
-
-namespace MySystem
-{
-    public class KxsPosPushService
-    {
-        public readonly static KxsPosPushService Instance = new KxsPosPushService();
-        private KxsPosPushService()
-        { }
-
-        public void Start()
-        {
-            Thread th = new Thread(dosomething);
-            th.IsBackground = true;
-            th.Start();
-        }
-
-        public void dosomething()
-        {
-            while (true)
-            {
-                string content = RedisDbconn.Instance.RPop<string>("KxsPosDataQueue");
-                if (!string.IsNullOrEmpty(content))
-                {
-                    try
-                    {
-                        RabbitMQClient.Instance.PushPosData(content, "");
-                    }
-                    catch (Exception ex)
-                    {                        
-                        function.WriteLog(DateTime.Now.ToString() + "\r\n" + ex.ToString(), "推送客小爽机具数据异常");
-                    }
-                }
-                else
-                {
-                    Thread.Sleep(500);
-                }
-            }
-        }
-
-
-        public void StartMp()
-        {
-            Thread th = new Thread(dosomethingMp);
-            th.IsBackground = true;
-            th.Start();
-        }
-
-        public void dosomethingMp()
-        {
-            while (true)
-            {
-                string content = MpRedisDbconn.Instance.RPop<string>("KxsActQueue");
-                if (!string.IsNullOrEmpty(content))
-                {
-                    try
-                    {
-                        RabbitMQClient.Instance.SendMsg3(content, "QUEUE_KXS_ACT_DIVISION");
-                    }
-                    catch (Exception ex)
-                    {                        
-                        function.WriteLog(DateTime.Now.ToString() + "\r\n" + ex.ToString(), "推送客小爽码牌激活数据异常");
-                    }
-                }
-                else
-                {
-                    Thread.Sleep(500);
-                }
-            }
-        }
-    }
-}