This commit is contained in:
@@ -6,7 +6,9 @@
|
||||
todo: enable response compression
|
||||
https://www.infoworld.com/article/3256012/how-to-use-response-compression-in-aspnet-core.html
|
||||
|
||||
|
||||
todo: tag refcount
|
||||
Move this into a procedure, it's apparently quite slow now that I can see the metrics
|
||||
|
||||
TODO: Why is this adding UTC bit to this query check the source code maybe something is up
|
||||
Schema settings mean that pg will ignore any tz specification so in theory it's ignored, but...
|
||||
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.OpenApi" Version="1.1.4" />
|
||||
<PackageReference Include="MiniProfiler.AspNetCore" Version="4.1.0" />
|
||||
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.1.0" />
|
||||
<PackageReference Include="MiniProfiler.EntityFrameworkCore" Version="4.1.0" />
|
||||
<PackageReference Include="NLog" Version="4.6.7" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="4.9.0" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.1.0" />
|
||||
|
||||
@@ -63,9 +63,18 @@ namespace AyaNova
|
||||
_newLog.LogDebug("Initializing services...");
|
||||
|
||||
|
||||
_newLog.LogDebug("Profiler");
|
||||
//https://dotnetthoughts.net/using-miniprofiler-in-aspnetcore-webapi/
|
||||
services.AddMemoryCache();
|
||||
services.AddMiniProfiler(options =>
|
||||
{
|
||||
options.RouteBasePath = "/profiler";
|
||||
|
||||
}).AddEntityFramework();
|
||||
|
||||
|
||||
//Server state service for shutting people out of api
|
||||
_newLog.LogDebug("ApiServerState");
|
||||
_newLog.LogDebug("ServerState service");
|
||||
services.AddSingleton(new AyaNova.Api.ControllerHelpers.ApiServerState());
|
||||
|
||||
//Init controllers
|
||||
@@ -289,7 +298,7 @@ namespace AyaNova
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
_newLog.LogDebug("Generator");
|
||||
services.AddSingleton<IHostedService, GeneratorService>();
|
||||
|
||||
Reference in New Issue
Block a user