private StartupDeduplicationService RunHealthChecks(MarginTradingSettings marginTradingSettings) { var deduplicationService = new StartupDeduplicationService(Environment, LogLocator.CommonLog, marginTradingSettings); deduplicationService .HoldLock(); new StartupQueuesCheckerService(marginTradingSettings) .Check(); return(deduplicationService); }
private StartupDeduplicationService RunHealthChecks(MarginTradingSettings marginTradingSettings) { var deduplicationService = new StartupDeduplicationService(Environment, LogLocator.CommonLog, marginTradingSettings); deduplicationService.HoldLock(); new QueueValidationService(marginTradingSettings.StartupQueuesChecker.ConnectionString, new[] { marginTradingSettings.StartupQueuesChecker.OrderHistoryQueueName, marginTradingSettings.StartupQueuesChecker.PositionHistoryQueueName }) .ThrowExceptionIfQueuesNotEmpty(!marginTradingSettings.StartupQueuesChecker.DisablePoisonQueueCheck); return(deduplicationService); }