Files
StoreWeb/Modules/CloudProduct/Services/GoodsViolationIndexJob.cs
T

14 lines
406 B
C#

using Microsoft.Extensions.DependencyInjection;
namespace Store.Modules.CloudProduct.Services;
public class GoodsViolationIndexJob(IServiceScopeFactory scopeFactory)
{
public async Task ProcessPendingAsync()
{
using var scope = scopeFactory.CreateScope();
await scope.ServiceProvider.GetRequiredService<GoodsViolationService>()
.DeleteViolationIndexesAsync();
}
}