Enhance UI, add AI integration, improve logging and database stats
This commit is contained in:
@@ -66,15 +66,15 @@ public class MarketSyncWorker : BackgroundService
|
||||
.First(x => x.Platform == p.Platform);
|
||||
|
||||
await rateLimiter.WaitAsync(provider.Platform, stoppingToken);
|
||||
var markets = await provider.GetMarketsAsync(batchSize, offset.ToString(), includeClosed, stoppingToken);
|
||||
var events = await provider.GetEventsAsync(batchSize, offset.ToString(), includeClosed, stoppingToken);
|
||||
|
||||
if (markets.Count == 0) break;
|
||||
if (events.Count == 0) break;
|
||||
|
||||
await marketRepo.AddOrUpdateRangeAsync(markets, stoppingToken);
|
||||
await marketRepo.AddOrUpdateEventsAsync(events, stoppingToken);
|
||||
|
||||
passSynced += markets.Count;
|
||||
cycleTotalSynced += markets.Count;
|
||||
_statsService.TrackMarketSync(provider.Platform, markets.Count);
|
||||
passSynced += events.Count;
|
||||
cycleTotalSynced += events.Count;
|
||||
_statsService.TrackMarketSync(provider.Platform, events.Count);
|
||||
offset += batchSize;
|
||||
|
||||
if (passSynced % 500 == 0)
|
||||
|
||||
Reference in New Issue
Block a user