Initial implementation of voice works scanning.
This commit is contained in:
26
JSMR.Application/Scanning/ScanVoiceWorksHandler.cs
Normal file
26
JSMR.Application/Scanning/ScanVoiceWorksHandler.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using JSMR.Application.Scanning.Ports;
|
||||
|
||||
namespace JSMR.Application.Scanning;
|
||||
|
||||
public sealed class ScanVoiceWorksHandler(IVoiceWorksScanner scanner)
|
||||
{
|
||||
//public async Task<ScanVoiceWorksResponse> HandleAsync(ScanVoiceWorksRequest request, CancellationToken cancellationToken)
|
||||
//{
|
||||
// var works = await scanner.ScanPageAsync(request, cancellationToken);
|
||||
|
||||
// if (works.Count == 0)
|
||||
// return new ScanVoiceWorksResponse();
|
||||
|
||||
// var ingests = works.Select(VoiceWorkIngest.From).ToList();
|
||||
// var upsert = await _writer.UpsertAsync(ingests, ct);
|
||||
|
||||
// // only update search text for affected rows
|
||||
// await _search.UpdateAsync(upsert.AffectedVoiceWorkIds, ct);
|
||||
|
||||
// return new ScanVoiceWorksResponse
|
||||
// {
|
||||
// Inserted = upsert.Inserted,
|
||||
// Updated = upsert.Updated
|
||||
// };
|
||||
//}
|
||||
}
|
||||
Reference in New Issue
Block a user