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

This commit is contained in:
2023-12-06 09:09:59 +08:00
parent 8f438ff314
commit 0e4c972b19
+23 -13
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)
{