From 79bece9e1caaedcf27066a26b60ef4fa089d12ec Mon Sep 17 00:00:00 2001 From: Brian Bicknell Date: Sun, 1 Mar 2026 22:48:41 -0500 Subject: [PATCH] Updated appsettings for the worker app. Added split querying for updaters. --- .../Ingestion/VoiceWorkSearchUpdater.cs | 3 ++- JSMR.Infrastructure/Ingestion/VoiceWorkUpdater.cs | 1 + JSMR.Worker/appsettings.Development.json | 14 +++++++++++--- JSMR.Worker/appsettings.json | 11 ++++++++++- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/JSMR.Infrastructure/Ingestion/VoiceWorkSearchUpdater.cs b/JSMR.Infrastructure/Ingestion/VoiceWorkSearchUpdater.cs index 674652b..28c10fd 100644 --- a/JSMR.Infrastructure/Ingestion/VoiceWorkSearchUpdater.cs +++ b/JSMR.Infrastructure/Ingestion/VoiceWorkSearchUpdater.cs @@ -11,13 +11,14 @@ public class VoiceWorkSearchUpdater(AppDbContext dbContext) : IVoiceWorkSearchUp public async Task UpdateAsync(int[] voiceWorkIds, CancellationToken cancellationToken) { List batch = await dbContext.VoiceWorks + .Where(vw => voiceWorkIds.Contains(vw.VoiceWorkId)) + .AsSplitQuery() .Include(vw => vw.Circle) .Include(vw => vw.Tags) .ThenInclude(vwt => vwt.Tag) .Include(vw => vw.Creators) .ThenInclude(vwc => vwc.Creator) .Include(vw => vw.EnglishVoiceWorks) - .Where(vw => voiceWorkIds.Contains(vw.VoiceWorkId)) .ToListAsync(cancellationToken); foreach (var voiceWork in batch) diff --git a/JSMR.Infrastructure/Ingestion/VoiceWorkUpdater.cs b/JSMR.Infrastructure/Ingestion/VoiceWorkUpdater.cs index b01f690..327cd82 100644 --- a/JSMR.Infrastructure/Ingestion/VoiceWorkUpdater.cs +++ b/JSMR.Infrastructure/Ingestion/VoiceWorkUpdater.cs @@ -54,6 +54,7 @@ public class VoiceWorkUpdater(AppDbContext dbContext, ITimeProvider timeProvider .ToDictionaryAsync(c => c.MakerId, cancellationToken), VoiceWorks: await dbContext.VoiceWorks .Where(v => productIds.Contains(v.ProductId)) + .AsSplitQuery() .Include(v => v.Creators) .Include(v => v.Tags) .Include(v => v.Localizations) diff --git a/JSMR.Worker/appsettings.Development.json b/JSMR.Worker/appsettings.Development.json index 18bab23..421f3ef 100644 --- a/JSMR.Worker/appsettings.Development.json +++ b/JSMR.Worker/appsettings.Development.json @@ -1,9 +1,17 @@ { "Logging": { "LogLevel": { - /*"Default": "Information",*/ - "Default": "Warning", - "Microsoft.AspNetCore": "Warning" + "Default": "Information", + + "Microsoft": "Warning", + "Microsoft.AspNetCore": "Warning", + "Microsoft.Hosting.Lifetime": "Information", + + "Microsoft.EntityFrameworkCore": "Warning", + "Microsoft.EntityFrameworkCore.Database.Command": "None", + + "System.Net.Http.HttpClient": "Warning", + "Polly": "Warning" } }, "ConnectionStrings": { diff --git a/JSMR.Worker/appsettings.json b/JSMR.Worker/appsettings.json index 1b2d3ba..27725ce 100644 --- a/JSMR.Worker/appsettings.json +++ b/JSMR.Worker/appsettings.json @@ -2,7 +2,16 @@ "Logging": { "LogLevel": { "Default": "Information", - "Microsoft.AspNetCore": "Warning" + + "Microsoft": "Warning", + "Microsoft.AspNetCore": "Warning", + "Microsoft.Hosting.Lifetime": "Information", + + "Microsoft.EntityFrameworkCore": "Warning", + "Microsoft.EntityFrameworkCore.Database.Command": "None", + + "System.Net.Http.HttpClient": "Warning", + "Polly": "Warning" } } } \ No newline at end of file