Jobs and services

This commit is contained in:
Nickk888 committed 2026-10-10 01:35:56 +02:00
1 parent 4fb8768807
commit c06f06c6ce
7 files changed
+142 -5

No files matched your search

+5
View File
@@ -1,5 +1,6 @@
using Microsoft.EntityFrameworkCore;
using PaperlessAI.Context;
using PaperlessAI.Jobs;
using PaperlessAI.Repositories;
using PaperlessAI.Services;
using Serilog;
@@ -8,6 +9,7 @@ var builder = WebApplication.CreateBuilder(args);
// Services
builder.Services.AddScoped<PaperlessDocumentService>();
builder.Services.AddSingleton<DocumentProcessingService>();
// Repositories
builder.Services.AddScoped<PaperlessDocumentRepository>();
@@ -39,6 +41,9 @@ Log.Logger = new LoggerConfiguration()
builder.Host.UseSerilog();
// Jobs
builder.Services.AddHostedService<CheckDocumentsToProcessJob>();
// App
var app = builder.Build();