protected override void OnStop() { _redisMQLog = new RedisMQLog { Title = "服务停止", Content = "大方工业云数据同步服务:【服务停止】", CDate = ToolMethods.GetNow() }; WriteLog(_redisMQLog); _server.Dispose(); }
protected override void OnStart(string[] args) { _redisMQLog = new RedisMQLog { Title = "服务启动", Content = "大方工业云数据同步服务:【服务启动】", CDate = ToolMethods.GetNow() }; WriteLog(_redisMQLog); _server.Start(); }
public void HangfireService() { try { } catch (Exception ee) { _redisMQLog = new RedisMQLog { Title = "服务状态异常", Content = "【服务异常】:" + ee.ToString(), CDate = ToolMethods.GetNow() }; WriteLog(_redisMQLog); } }