Updated appsettings for the worker app. Added split querying for updaters.
This commit is contained in:
@@ -11,13 +11,14 @@ public class VoiceWorkSearchUpdater(AppDbContext dbContext) : IVoiceWorkSearchUp
|
||||
public async Task UpdateAsync(int[] voiceWorkIds, CancellationToken cancellationToken)
|
||||
{
|
||||
List<VoiceWork> 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)
|
||||
|
||||
Reference in New Issue
Block a user