修改program 代码位置
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
8f438ff314
commit
0e4c972b19
|
@ -48,18 +48,6 @@ if (string.IsNullOrWhiteSpace(enviromentName))
|
||||||
: "Development";
|
: "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());
|
NewId.SetProcessIdProvider(new CurrentProcessIdProvider());
|
||||||
|
@ -248,7 +236,6 @@ app.UseEndpoints(endpoints =>
|
||||||
// Serilog
|
// Serilog
|
||||||
SerilogExtension.AddSerilogSetup(enviromentName, app.Services);
|
SerilogExtension.AddSerilogSetup(enviromentName, app.Services);
|
||||||
|
|
||||||
Log.Logger.Warning($"当前环境:{enviromentName}");
|
|
||||||
|
|
||||||
var hangfireJobService = app.Services.GetRequiredService<IIRaCISHangfireJob>();
|
var hangfireJobService = app.Services.GetRequiredService<IIRaCISHangfireJob>();
|
||||||
|
|
||||||
|
@ -259,8 +246,31 @@ await hangfireJobService.InitHangfireJobTaskAsync();
|
||||||
|
|
||||||
try
|
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();
|
app.Run();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue