public HeartbeatCashoutStarterPeriodicalHandler(
            HeartbeatCashoutPeriodicalHandlerSettings settings,
            TimeSpan timerPeriod,
            ILogFactory logFactory,
            ILastCashoutEventMomentRepository lastMomentRepo,
            ICashoutLockRepository cashoutLockRepository,
            ICqrsEngine cqrsEngine)
        {
            _settings              = settings;
            _lastMomentRepo        = lastMomentRepo;
            _cashoutLockRepository = cashoutLockRepository;
            _cqrsEngine            = cqrsEngine;
            _log = logFactory.CreateLog(this);

            _timer = new TimerTrigger(
                $"{nameof(HeartbeatCashoutStarterPeriodicalHandler)} : {settings.AssetId}",
                timerPeriod,
                logFactory);

            _timer.Triggered += Execute;
        }
예제 #2
0
 public CheckCashoutPreconditionsCommandHandler(ILastCashoutEventMomentRepository lastCashoutEventMomentRepository,
                                                IChaosKitty chaosKitty)
 {
     _lastCashoutEventMomentRepository = lastCashoutEventMomentRepository;
     _chaosKitty = chaosKitty;
 }
예제 #3
0
 public RegisterCashoutRegistrationLastMomentCommandHandler(IChaosKitty chaosKitty,
                                                            ILastCashoutEventMomentRepository lastMomentRepository)
 {
     _chaosKitty           = chaosKitty;
     _lastMomentRepository = lastMomentRepository;
 }