private void CatchUpStopped(CatchUpStopReason reason)
        {
            var message = "Stopping catch up {Projection}: {Reason}";

            switch (reason)
            {
            case CatchUpStopReason.Error:
                _logger.LogError(message, _projection.Id, reason);
                break;

            case CatchUpStopReason.Aborted:
                _logger.LogWarning(message, _projection.Id, reason);
                break;

            default:
                _logger.LogInformation(message, _projection.Id, reason);
                break;
            }

            _commandBus.Queue(new RemoveStoppedCatchUp(_projection.Id));

            if (CatchUpStopReason.Finished == reason)
            {
                _commandBus.Queue(new Subscribe(_projection.Id));
            }
        }
Exemplo n.º 2
0
        private void CatchUpStopped(CatchUpStopReason reason)
        {
            var message = "Stopping catch up {RunnerName}: {Reason}";

            if (reason == CatchUpStopReason.Error)
            {
                _logger.LogWarning(message, _runnerName, reason);
            }
            else
            {
                _logger.LogInformation(message, _runnerName, reason);
            }

            _commandBus.Queue(new RemoveStoppedCatchUp(_runnerName));
            if (CatchUpStopReason.Finished == reason)
            {
                _commandBus.Queue(new Subscribe(_runnerName));
            }
        }