private Task ClearDataAsync(List <string> assetPairIds) { var keys = new List <string>(); foreach (var assetPairId in assetPairIds) { keys.Add(RedisService.GetMarketDataBaseVolumeKey(assetPairId)); keys.Add(RedisService.GetMarketDataQuoteVolumeKey(assetPairId)); keys.Add(RedisService.GetMarketDataPriceKey(assetPairId)); } return(Task.WhenAll( _database.KeyDeleteAsync(keys.Select(x => (RedisKey)x).ToArray()), _tickerWriter.CleanAndKeepMaxPartitions(0), _priceWriter.CleanAndKeepMaxPartitions(0) )); }
public MarketDataServiceClient(RedisService redisService) { _redisService = redisService; }