public async Task Process( Penalty penalty, CancellationToken cancellationToken) { if (!penalty.IsActive) { return; } var operations = await _operationRepository.Get(penalty.Id, cancellationToken); if (operations.Sum(_ => _.Amount) >= penalty.Amount) { penalty.MakeInActive(); } }