예제 #1
0
        protected override async Task DoWork(PairConfig pair, CancellationToken stoppingToken)
        {
            while (!stoppingToken.IsCancellationRequested)
            {
                try
                {
                    await _tradesProcessor.ClearData(Exchange.Code, pair.Symbol);

                    await _bookProcessor.ClearData(Exchange.Code, pair.Symbol);

                    await Task.Delay(TimeSpan.FromHours(1));
                }
                catch (Exception ex)
                {
                    _logger.LogError($"{Exchange.Description} Trades service failed with message {ex.Message}", ex);
                }
            }
        }