Fix worker pagination, apply Analytics fixes, add analyze backlog endpoint
This commit is contained in:
@@ -5,6 +5,7 @@ using Predictalytics.Infrastructure.Logging;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace Predictalytics.Worker.Services;
|
||||
|
||||
@@ -75,12 +76,15 @@ public class MarketHistoryWorker : BackgroundService
|
||||
.Distinct()
|
||||
.ToList();
|
||||
|
||||
var config = scope.ServiceProvider.GetRequiredService<Microsoft.Extensions.Configuration.IConfiguration>();
|
||||
bool isEnabled = config.GetValue<bool>($"PlatformSettings:{market.Platform}:EnableCrawling", market.Platform == PlatformType.Polymarket);
|
||||
|
||||
foreach (var wallet in wallets)
|
||||
{
|
||||
var existing = await traderRepo.GetByPlatformIdAsync(
|
||||
market.Platform, wallet, stoppingToken);
|
||||
|
||||
if (existing == null)
|
||||
if (existing == null && isEnabled)
|
||||
{
|
||||
var trader = new Domain.Entities.Trader
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user