Add tracking for analyzed traders and add crawling configuration to appsettings.json
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;
|
||||
|
||||
@@ -37,6 +38,10 @@ public class MarketSyncWorker : BackgroundService
|
||||
|
||||
foreach (var p in platformProviders.Where(x => x.IsImplemented))
|
||||
{
|
||||
var config = _services.GetRequiredService<Microsoft.Extensions.Configuration.IConfiguration>();
|
||||
bool isEnabled = config.GetValue<bool>($"PlatformSettings:{p.PlatformName}:EnableCrawling", p.Platform == PlatformType.Polymarket);
|
||||
if (!isEnabled) continue;
|
||||
|
||||
try
|
||||
{
|
||||
if (stoppingToken.IsCancellationRequested) break;
|
||||
|
||||
Reference in New Issue
Block a user