refactor: Refactoring of text creation

This commit is contained in:
henrik
2024-12-10 21:42:22 +01:00
parent 41a174e1cb
commit b4b96b3f4e
9 changed files with 101 additions and 138 deletions

View File

@@ -3,8 +3,8 @@ using Elastic.Extensions.Logging.Options;
using Elastic.Transport;
using Microsoft.AspNetCore.DataProtection;
using Pushy.Components;
using Pushy.Grains;
using StackExchange.Redis;
using LinkGenerator = Pushy.LinkGenerator;
var builder = WebApplication.CreateBuilder(args);
@@ -51,7 +51,8 @@ if (builder.Environment.IsProduction())
});
}
builder.Services.AddScoped<LinkGenerator>();
builder.Services.AddScoped(service =>
service.GetRequiredService<IGrainFactory>().GetGrain<ILinkGenerator>(Guid.Empty));
builder.Services.AddAllElasticApm();
builder.Services.AddHealthChecks();