修改program 代码位置
continuous-integration/drone/push Build is passing Details

IRC_NewDev
hang 2023-12-06 09:09:59 +08:00
parent 8f438ff314
commit 0e4c972b19
1 changed files with 23 additions and 13 deletions

View File

@ -48,18 +48,6 @@ if (string.IsNullOrWhiteSpace(enviromentName))
: "Development";
}
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
Log.Logger.Warning($"当前部署平台环境windows");
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
Log.Logger.Warning($"当前部署平台环境linux");
}
else
{
Log.Logger.Warning($"当前部署平台环境OSX or FreeBSD");
}
NewId.SetProcessIdProvider(new CurrentProcessIdProvider());
@ -248,7 +236,6 @@ app.UseEndpoints(endpoints =>
// Serilog
SerilogExtension.AddSerilogSetup(enviromentName, app.Services);
Log.Logger.Warning($"当前环境:{enviromentName}");
var hangfireJobService = app.Services.GetRequiredService<IIRaCISHangfireJob>();
@ -259,8 +246,31 @@ await hangfireJobService.InitHangfireJobTaskAsync();
try
{
#region 运行环境 部署平台
Log.Logger.Warning($"当前环境:{enviromentName}");
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
Log.Logger.Warning($"当前部署平台环境windows");
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
Log.Logger.Warning($"当前部署平台环境linux");
}
else
{
Log.Logger.Warning($"当前部署平台环境OSX or FreeBSD");
}
#endregion
app.Run();
}
catch (Exception e)
{