Refactor code formatting and improve readability: standardize line breaks and indentation across various endpoint files, enhancing code clarity and maintainability. Update package version formatting in Directory.Packages.props for consistency.
This commit is contained in:
@@ -59,15 +59,20 @@ public sealed class SchedulingBackgroundService(
|
||||
var db = scope.ServiceProvider.GetRequiredService<IAppDbContext>();
|
||||
var generator = scope.ServiceProvider.GetRequiredService<ScheduleGenerator>();
|
||||
|
||||
var channelIds = await db.Channels
|
||||
.Where(c => c.IsEnabled)
|
||||
var channelIds = await db
|
||||
.Channels.Where(c => c.IsEnabled)
|
||||
.Select(c => c.Id)
|
||||
.ToListAsync(cancellationToken);
|
||||
|
||||
var now = DateTimeOffset.UtcNow;
|
||||
foreach (var channelId in channelIds)
|
||||
{
|
||||
var added = await generator.GenerateAsync(channelId, now, regenerate: false, cancellationToken);
|
||||
var added = await generator.GenerateAsync(
|
||||
channelId,
|
||||
now,
|
||||
regenerate: false,
|
||||
cancellationToken
|
||||
);
|
||||
if (added > 0)
|
||||
logger.LogInformation(
|
||||
"Канал {ChannelId}: добавлено {Count} записей расписания",
|
||||
|
||||
Reference in New Issue
Block a user