Ejemplo n.º 1
0
        private async Task produce(int region, int typeId, EveData.MarketData.MarketHistoryEntry latest)
        {
            CrestMarketHistory result;

            while (true)
            {
                try {
                    result = await EveCrest.GetMarketHistoryAsync(region, typeId).ConfigureAwait(false);

                    break;
                } catch (Exception) {
                    Console.WriteLine("Something went wrong, waiting...");
                    Thread.Sleep(30000);
                }
            }
            var limit   = DateTime.UtcNow.AddMonths(-3);
            var history = result.Entries.Where(e => e.Date > limit).ToList();

            if (latest != null)
            {
                history = history.Where(e => e.Date > latest.Date).ToList();
            }
            Queue.Add(new ConsumerTask(typeId, region, history));
        }
Ejemplo n.º 2
0
 public async Task <CrestMarketHistory> GetMarketHistoryAsync(int region, int invType)
 {
     return(await _eveCrest.GetMarketHistoryAsync(region, invType).ConfigureAwait(false));
 }
Ejemplo n.º 3
0
 public async Task GetMarketHistory_NoErrors()
 {
     MarketHistoryCollection data = await crest.GetMarketHistoryAsync(RegionId, TypeId);
 }
Ejemplo n.º 4
0
 public async Task GetMarketHistory_NoErrors()
 {
     var data = await _crest.GetMarketHistoryAsync(RegionId, TypeId);
 }