lixiaojun
2024-05-13 49ab80b222ad2f5a17b419e7140158478447b997
Yw.TopShelf.Run/Program.cs
@@ -3,16 +3,16 @@
using Topshelf;
//SZJT
//HostFactory.Run(x =>
//{
//    x.Service<Service>();
//    x.RunAsLocalSystem();
//    x.SetDescription("智慧泵站Core版运行分析程序(SZJT)");
//    x.SetDisplayName("IStation.Core.Server.Run.SZJT");
//    x.SetServiceName("IStation.Core.Server.Run.SZJT");
//    x.EnableServiceRecovery(r => r.RestartService(TimeSpan.FromSeconds(120)));
//    x.StartAutomatically();
//});
HostFactory.Run(x =>
{
    x.Service<Service>();
    x.RunAsLocalSystem();
    x.SetDescription("智慧泵站Core版运行分析程序(SZJT)");
    x.SetDisplayName("IStation.Core.Server.Run.SZJT");
    x.SetServiceName("IStation.Core.Server.Run.SZJT");
    x.EnableServiceRecovery(r => r.RestartService(TimeSpan.FromSeconds(120)));
    x.StartAutomatically();
});
//SMI
@@ -29,16 +29,16 @@
//PHM
HostFactory.Run(x =>
{
    x.Service<Service>();
    x.RunAsLocalSystem();
    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();
});
//HostFactory.Run(x =>
//{
//    x.Service<Service>();
//    x.RunAsLocalSystem();
//    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();
//});