using FictionArchive.Service.NovelService.Services; using FictionArchive.Service.Shared.Contracts.Events; using MassTransit; using Microsoft.Extensions.Logging; namespace FictionArchive.Service.NovelService.Consumers; public class ChapterPullRequestedConsumer : IConsumer { private readonly ILogger _logger; private readonly NovelUpdateService _novelUpdateService; public ChapterPullRequestedConsumer( ILogger logger, NovelUpdateService novelUpdateService) { _logger = logger; _novelUpdateService = novelUpdateService; } public async Task Consume(ConsumeContext context) { var message = context.Message; await _novelUpdateService.PullChapterContents(message.NovelId, message.VolumeId, message.ChapterOrder); } }