Simplify infrastructure services and move all recurring jobs to Hangfire
This commit is contained in:
@@ -23,14 +23,7 @@ public class DailyMixGenerationJob(
|
||||
logger.LogInformation("Starting daily mix generation for {Count} users", userIds.Count);
|
||||
|
||||
foreach (var userId in userIds)
|
||||
{
|
||||
var result = await mediator.Send(new GenerateMixesForUserCommand(userId), cancellationToken);
|
||||
if (result.IsError)
|
||||
{
|
||||
logger.LogWarning("Failed to generate mixes for user {UserId}: {Error}",
|
||||
userId, result.FirstError.Description);
|
||||
}
|
||||
}
|
||||
await mediator.Send(new GenerateMixesForUserCommand(userId), cancellationToken);
|
||||
|
||||
logger.LogInformation("Finished daily mix generation");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user