Импорт

This commit is contained in:
Халимов Рустам
2026-04-06 22:20:13 +03:00
parent fa185afc73
commit 1558b20470
317 changed files with 18311 additions and 924 deletions
@@ -1,3 +1,6 @@
using Knot.Modules.TelegramImport.Application.Abstractions;
using Knot.Modules.TelegramImport.Infrastructure.Background;
using Knot.Modules.TelegramImport.Infrastructure.Parser;
using Microsoft.Extensions.DependencyInjection;
namespace Knot.Modules.TelegramImport;
@@ -6,6 +9,13 @@ public static class DependencyInjection
{
public static IServiceCollection AddTelegramImportModule(this IServiceCollection services)
{
services.AddSingleton<ITelegramHtmlParser, TelegramHtmlParser>();
services.AddSingleton<IImportJobStore, ImportJobStore>();
// Register worker as itself and as a hosted service
services.AddSingleton<TelegramImportWorker>();
services.AddHostedService<TelegramImportWorker>(sp => sp.GetRequiredService<TelegramImportWorker>());
return services;
}
}