public async Task Handle(VacancyReviewReferredEvent notification, CancellationToken cancellationToken)
        {
            try
            {
                _logger.LogInformation("Sending notification for vacancy {vacancyReference} referral.", notification.VacancyReference);

                var vacancyReview = await _vacancyReviewRepository.GetAsync(notification.ReviewId);

                await _notifier.VacancyReviewReferred(vacancyReview);
            }
            catch (NotificationException ex)
            {
                _logger.LogError(ex, $"Unable to send notification for {nameof(VacancyReviewReferredEvent)} and VacancyReference: {{vacancyReference}}", notification.VacancyReference);
            }
        }
Esempio n. 2
0
 public Task Handle(VacancyReviewReferredEvent notification, CancellationToken cancellationToken)
 => HandleUsingEventStore(notification);
 public Task Handle(VacancyReviewReferredEvent notification, CancellationToken cancellationToken)
 {
     return(Handle(notification));
 }