|
|
@@ -25,7 +25,7 @@ namespace MySystem
|
|
|
{
|
|
|
while (true)
|
|
|
{
|
|
|
- string content = MpRedisDbconn.Instance.RPop<string>("KxsActQueue");
|
|
|
+ string content = RedisDbconn.Instance.RPop<string>("KxsActQueue");
|
|
|
if (!string.IsNullOrEmpty(content))
|
|
|
{
|
|
|
try
|
|
|
@@ -43,5 +43,36 @@ namespace MySystem
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|