using FictionArchive.Service.Shared.MassTransit.Contracts.Commands; using MassTransit; namespace FictionArchive.Service.NovelService.Services.Consumers; public class PullChapterContentCommandConsumer : IConsumer { private readonly ILogger _logger; private readonly NovelUpdateService _novelUpdateService; public PullChapterContentCommandConsumer( ILogger logger, NovelUpdateService novelUpdateService) { _logger = logger; _novelUpdateService = novelUpdateService; } public async Task Consume(ConsumeContext context) { var command = context.Message; _logger.LogInformation( "Processing PullChapterContentCommand for Novel: {NovelId}, Volume: {VolumeId}, Chapter: {ChapterOrder}", command.NovelId, command.VolumeId, command.ChapterOrder); await _novelUpdateService.PullChapterContents(command.NovelId, command.VolumeId, command.ChapterOrder); } }