This commit is contained in:
@@ -6,12 +6,14 @@ using LiteCharms.Features.MidrandBooks.Seed.Configuration;
|
||||
namespace LiteCharms.Features.MidrandBooks.Seed;
|
||||
|
||||
public class ProductsSeederService(ProductService productService, AuthorService authorService, BooksService booksService,
|
||||
IOptions<CdnSettings> options, ILogger<ProductsSeederService> logger) : BackgroundService
|
||||
IFeatureManager features, IOptions<CdnSettings> options, ILogger<ProductsSeederService> logger) : BackgroundService
|
||||
{
|
||||
private readonly CdnSettings cdnSettings = options.Value;
|
||||
|
||||
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
||||
{
|
||||
if (await features.IsEnabledAsync("ProductsSeederService") is not true) return;
|
||||
|
||||
logger.LogInformation("Product Seeding started");
|
||||
|
||||
if (cdnSettings.BookCovers is null || cdnSettings.BookCovers.Length == 0)
|
||||
|
||||
Reference in New Issue
Block a user