增加一些功能,比如 修正重启后,队列消费会报错的问题
This commit is contained in:
@@ -801,7 +801,10 @@ namespace WebSite.Controllers
|
||||
/// <returns></returns>
|
||||
public ActionResult GetRoomSceneList(string jsonData)
|
||||
{
|
||||
|
||||
if (string.IsNullOrEmpty(jsonData.Trim()))
|
||||
{
|
||||
return Json(new { IsSuccess = false, Result = "非法调用" }, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
Interlocked.Increment(ref WebAPI_TongJi.GetRoomSceneList);
|
||||
string start_time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
try
|
||||
@@ -5327,7 +5330,7 @@ namespace WebSite.Controllers
|
||||
}
|
||||
|
||||
long jishu_error = Interlocked.Read(ref MvcApplication.UDPServerErrorCount);
|
||||
if (jishu_error >= 3)
|
||||
if (jishu_error >= 5)
|
||||
{
|
||||
logger.Error("重启了UDP服务器");
|
||||
Interlocked.Exchange(ref MvcApplication.UDPServerErrorCount, 0);
|
||||
@@ -6421,7 +6424,7 @@ namespace WebSite.Controllers
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Error("同派出错:"+ex.Message);
|
||||
logger.Error("同派出错:" + ex.Message);
|
||||
return Json(new { IsSuccess = false, Message = HttpContext.InnerLanguage("SaveFailedBecause") + ex.Message });
|
||||
}
|
||||
}
|
||||
@@ -6480,13 +6483,14 @@ namespace WebSite.Controllers
|
||||
foreach (Host host in hosts)//该房型下所有主机关联回路
|
||||
{
|
||||
//删除掉上报的
|
||||
CSRedisCacheHelper.Del_Partition(CacheKey.DingShiReportData + "_" + host.ID, 3);
|
||||
//CSRedisCacheHelper.Del_Partition(CacheKey.DingShiReportData + "_" + host.ID, 3);
|
||||
var hostModal = HostModalManager.GetByModalAddress(host.ID, roomTypeModal.ModalAddress);
|
||||
if (null == hostModal)
|
||||
{
|
||||
HostModalManager.Save(new HostModal { HostID = host.ID, Modal = roomTypeModal, Status = 2, Time = 0, UpdateTime = DateTime.Now });
|
||||
}
|
||||
}
|
||||
QuanJuVar.BaoJingUpLoad = RoomTypeModalManager.LoadAllBaoJingUpload();
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
@@ -6642,7 +6646,7 @@ namespace WebSite.Controllers
|
||||
try
|
||||
{
|
||||
var qqq = HostManager.LoadAllID_HostNumberMapping();
|
||||
var qqq1 = qqq.Select(a => new { a.HostNumber, a.Id }).ToList();
|
||||
var qqq1 = qqq.Select(a => new { a.HostNumber, a.Id, a.RoomTypeId }).ToList();
|
||||
|
||||
|
||||
if (qqq1.Count > 0)
|
||||
@@ -6653,7 +6657,7 @@ namespace WebSite.Controllers
|
||||
if (!string.IsNullOrEmpty(item.HostNumber))
|
||||
{
|
||||
//CSRedisCacheHelper.HMSet(5, CacheKey.RoomNumber_HostNumber, item.HostNumber, item.RoomNumber);
|
||||
CSRedisCacheHelper.HMSet(5, CacheKey.HostId_HostNumber, item.HostNumber, item.Id);
|
||||
CSRedisCacheHelper.HMSet(5, CacheKey.HostId_HostNumber, item.HostNumber, item.Id + "#" + item.RoomTypeId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6815,7 +6819,7 @@ namespace WebSite.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
HostServer.StopConsumerTasks();
|
||||
//HostServer.StopConsumerTasks();
|
||||
if (key.Equals("blw^_^wlb"))
|
||||
{
|
||||
var hostServer = (IHostServer)MvcApplication.cxt.GetObject("RCUHost.HostServer");
|
||||
|
||||
Reference in New Issue
Block a user