Ejemplo n.º 1
0
        public Task Handle(LiveVacancyClosingDateChangedEvent notification, CancellationToken cancellationToken)
        {
            _logger.LogInformation("Handling {notificationType} for vacancy id {vacancyId}",
                                   nameof(LiveVacancyClosingDateChangedEvent), notification.VacancyId);

            var message = new FaaVacancyStatusSummary(notification.VacancyReference, FaaVacancyStatuses.Live, notification.NewClosingDate);

            return(_faaService.PublishVacancyStatusSummaryAsync(message));
        }
Ejemplo n.º 2
0
        private Task NotifyFaaVacancyHasClosed(VacancyClosedEvent notification)
        {
            var message = new FaaVacancyStatusSummary(notification.VacancyReference, FaaVacancyStatuses.Expired, _timeProvider.Now);

            return(_faaService.PublishVacancyStatusSummaryAsync(message));
        }