lixiaojun
2024-09-12 bdc231202be3ba32d393a61f6dcef654d3441554
Yw.TopShelf.Run/Program.cs
@@ -16,13 +16,26 @@
//SMI
//HostFactory.Run(x =>
//{
//    x.Service<Service>();
//    x.RunAsLocalSystem();
//    x.SetDescription("智慧泵站Core版运行分析程序(SMI)");
//    x.SetDisplayName("IStation.Core.Server.Run.SMI");
//    x.SetServiceName("IStation.Core.Server.Run.SMI");
//    x.EnableServiceRecovery(r => r.RestartService(TimeSpan.FromSeconds(120)));
//    x.StartAutomatically();
//});
//PHM
HostFactory.Run(x =>
{
    x.Service<Service>();
    x.RunAsLocalSystem();
    x.SetDescription("智慧泵站Core版运行分析程序(SMI)");
    x.SetDisplayName("IStation.Core.Server.Run.SMI");
    x.SetServiceName("IStation.Core.Server.Run.SMI");
    x.SetDescription("智慧泵站Core版运行分析程序(PHM)");
    x.SetDisplayName("IStation.Core.Server.Run.PHM");
    x.SetServiceName("IStation.Core.Server.Run.PHM");
    x.EnableServiceRecovery(r => r.RestartService(TimeSpan.FromSeconds(120)));
    x.StartAutomatically();
});