.NET4.7升级4.7。添加Redis新方法。
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Face.Domain.Entities;
|
||||
using Common;
|
||||
using Face.Domain.Entities;
|
||||
using Face.Services.Manager;
|
||||
using Face.SystemTask;
|
||||
using Face.Web.Areas.App.Controllers;
|
||||
@@ -9,8 +10,11 @@ using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
@@ -18,12 +22,11 @@ using System.Web.Http;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Optimization;
|
||||
using System.Web.Routing;
|
||||
using TencentCloud.Common.Profile;
|
||||
using TencentCloud.Common;
|
||||
using TencentCloud.Common.Profile;
|
||||
using WebServer;
|
||||
using static Face.Web.Areas.App.Models.Roominfo;
|
||||
using System.Text;
|
||||
using WebSocketToolsConsole;
|
||||
using static Face.Web.Areas.App.Models.Roominfo;
|
||||
|
||||
namespace Face.Web
|
||||
{
|
||||
@@ -261,7 +264,8 @@ namespace Face.Web
|
||||
{
|
||||
string fname = "移海";
|
||||
List<DeviceManage> tbl = SqlSugarBase.GesmartDb().Queryable<DeviceManage>().Where(x=>x.Status==true && x.Factory== fname).ToList();
|
||||
for (int i = 0; i < tbl.Count; i++)
|
||||
//for (int i = 0; i < tbl.Count; i++)
|
||||
for (int i = 0; i < 1; i++)
|
||||
{
|
||||
if (tbl[i].Status == true)
|
||||
{
|
||||
@@ -281,7 +285,12 @@ namespace Face.Web
|
||||
info.msgx = msgx;
|
||||
info.pmsid = -1;
|
||||
string sendMsg = Newtonsoft.Json.JsonConvert.SerializeObject(info);
|
||||
UdpCommunication.QueueSend(sendMsg);
|
||||
|
||||
// 2025/12/10去除队列发送 XU
|
||||
|
||||
//UdpCommunication.QueueSend(sendMsg);
|
||||
Exception ex = new Exception("每天2点定时执行一次基本信息命令发送:" + sendMsg);
|
||||
LogHelp.WriteExceptionLog(ex);
|
||||
|
||||
Task.Delay(10000);
|
||||
|
||||
@@ -306,6 +315,23 @@ namespace Face.Web
|
||||
//if (!SyncHotelServer.SyncHotelGroups())
|
||||
// Logs.WriteTimingUDPLog("2:00执行定时任务--清除酒店失败~");
|
||||
}).ToRunEvery(0).Days().At(2, 00);
|
||||
|
||||
Schedule(() =>
|
||||
{
|
||||
string batFilePath = "C:\\FaceConsole\\重启.bat"; ;
|
||||
var rs = CSRedisCacheHelper.Get<string>("CSRedisCacheHelper");
|
||||
if (rs == null)
|
||||
{
|
||||
Process.Start(new ProcessStartInfo()
|
||||
{
|
||||
FileName = batFilePath,
|
||||
WorkingDirectory = Path.GetDirectoryName(batFilePath),
|
||||
UseShellExecute = true,
|
||||
CreateNoWindow = false
|
||||
});
|
||||
}
|
||||
|
||||
}).ToRunEvery(5).Minutes();
|
||||
}
|
||||
|
||||
public static void GoWork()
|
||||
|
||||
Reference in New Issue
Block a user