Skip to content

Commit

Permalink
fix: 移除旧方式预热程序
Browse files Browse the repository at this point in the history
  • Loading branch information
WangJunZzz committed Mar 24, 2024
1 parent 568fb5c commit 993bfca
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,6 @@ public void ConfigureServices(IServiceCollection services)
public void Configure(IApplicationBuilder app,IHostApplicationLifetime lifetime)
{
app.InitializeApplication();
lifetime.ApplicationStopped.Register(ConfigurePreheat);
}


/// <summary>
/// 程序首次访问接口速度慢,事先预热
/// </summary>
[Obsolete("请使用Lion.AbpPro.Starter模块,实现IAbpProStarterContributor")]
private void ConfigurePreheat()
{
var url = _configuration.GetValue<string>("App:SelfUrl");
if (url.IsNullOrWhiteSpace()) return;
var requestUrl = $"{url}/api/abp/application-configuration";
new HttpClient().GetAsync(requestUrl).Wait();
}
}
}

0 comments on commit 993bfca

Please sign in to comment.