public GeoTests() { if (String.IsNullOrWhiteSpace(Settings.Current.GeoIPDatabasePath)) { return; } _resolver = new MindMaxGeoIPResolver(); }
public MigrationJobBase(IElasticClient elasticClient, EventUpgraderPluginManager eventUpgraderPluginManager, EventIndex eventIndex, StackIndex stackIndex, IValidator<Stack> stackValidator, IValidator<PersistentEvent> eventValidator, IGeoIPResolver geoIpResolver, ILockProvider lockProvider, ICacheClient cache) { _eventUpgraderPluginManager = eventUpgraderPluginManager; _mongoDatabase = GetMongoDatabase(); _eventRepository = new EventMigrationRepository(elasticClient, eventIndex, eventValidator); _stackRepository = new StackMigrationRepository(elasticClient, stackIndex, _eventRepository, stackValidator); _geoIpResolver = geoIpResolver; _lockProvider = lockProvider; _cache = cache; _batchSize = MigrationSettings.Current.MigrationBatchSize; }
public GeoTests() { var dataDirectory = PathHelper.ExpandPath(".\\"); var storage = new FolderFileStorage(dataDirectory); if (!storage.ExistsAsync(MindMaxGeoIPResolver.GEO_IP_DATABASE_PATH).Result) { var job = new DownloadGeoIPDatabaseJob(storage).Run(); Assert.NotNull(job); Assert.True(job.IsSuccess); } _resolver = new MindMaxGeoIPResolver(storage); }
public GeoTests() { var databasePath = PathHelper.ExpandPath(Settings.Current.GeoIPDatabasePath); if (String.IsNullOrWhiteSpace(databasePath) || !File.Exists(databasePath)) { Console.WriteLine("Unable to resolve GeoIP Database Path"); return; } _resolver = new MindMaxGeoIPResolver(); }
public MigrationJobBase(IElasticClient elasticClient, EventUpgraderPluginManager eventUpgraderPluginManager, IValidator <Stack> stackValidator, IValidator <PersistentEvent> eventValidator, IGeoIPResolver geoIpResolver, ILockProvider lockProvider, ICacheClient cache) { _eventUpgraderPluginManager = eventUpgraderPluginManager; _mongoDatabase = GetMongoDatabase(); _eventRepository = new EventMigrationRepository(elasticClient, eventValidator); _stackRepository = new StackMigrationRepository(elasticClient, _eventRepository, stackValidator); _geoIpResolver = geoIpResolver; _lockProvider = lockProvider; _cache = cache; _batchSize = ConfigurationManager.AppSettings.GetInt("Migration:BatchSize", 50); }
public GeoTests() { var dataDirectory = PathHelper.ExpandPath(".\\"); var storage = new FolderFileStorage(dataDirectory); if (!storage.ExistsAsync(MindMaxGeoIPResolver.GEO_IP_DATABASE_PATH).Result) { var job = new DownloadGeoIPDatabaseJob(storage).Run(); Assert.NotNull(job); Assert.True(job.IsSuccess); } _resolver = new MindMaxGeoIPResolver(storage); }
private async Task<IGeoIPResolver> GetResolverAsync() { if (_resolver != null) return _resolver; var dataDirectory = PathHelper.ExpandPath(".\\"); var storage = new FolderFileStorage(dataDirectory); if (!await storage.ExistsAsync(MindMaxGeoIPResolver.GEO_IP_DATABASE_PATH)) { var job = new DownloadGeoIPDatabaseJob(new InMemoryCacheClient(), storage); var result = await job.RunAsync(); Assert.NotNull(result); Assert.True(result.IsSuccess); } return _resolver = new MindMaxGeoIPResolver(storage); }
private async Task <IGeoIPResolver> GetResolverAsync() { if (_resolver != null) { return(_resolver); } var dataDirectory = PathHelper.ExpandPath(".\\"); var storage = new FolderFileStorage(dataDirectory); if (!await storage.ExistsAsync(MindMaxGeoIPResolver.GEO_IP_DATABASE_PATH)) { var job = new DownloadGeoIPDatabaseJob(new InMemoryCacheClient(), storage); var result = await job.RunAsync(); Assert.NotNull(result); Assert.True(result.IsSuccess); } return(_resolver = new MindMaxGeoIPResolver(storage)); }
public QueueEventMigrationsJob(IQueue<EventMigrationBatch> queue, IElasticClient elasticClient, EventUpgraderPluginManager eventUpgraderPluginManager, EventIndex eventIndex, StackIndex stackIndex, IValidator<Stack> stackValidator, IValidator<PersistentEvent> eventValidator, IGeoIPResolver geoIpResolver, ILockProvider lockProvider, ICacheClient cache) : base(elasticClient, eventUpgraderPluginManager, eventIndex, stackIndex, stackValidator, eventValidator, geoIpResolver, lockProvider, cache) { _queue = queue; }
public EventMigrationJob(IQueue <EventMigrationBatch> queue, IElasticClient elasticClient, EventUpgraderPluginManager eventUpgraderPluginManager, IValidator <Stack> stackValidator, IValidator <PersistentEvent> eventValidator, IGeoIPResolver geoIpResolver, ILockProvider lockProvider, ICacheClient cache) : base(elasticClient, eventUpgraderPluginManager, stackValidator, eventValidator, geoIpResolver, lockProvider, cache) { _queue = queue; }
public GeoPlugin(IGeoIPResolver geoIpResolver) { _geoIpResolver = geoIpResolver; }
public GeoPlugin(IGeoIPResolver geoIpResolver) { _geoIpResolver = geoIpResolver; }
public StackMigrationJob(IElasticClient elasticClient, EventUpgraderPluginManager eventUpgraderPluginManager, EventIndex eventIndex, StackIndex stackIndex, IValidator<Stack> stackValidator, IValidator<PersistentEvent> eventValidator, IGeoIPResolver geoIpResolver, ILockProvider lockProvider, ICacheClient cache) : base(elasticClient, eventUpgraderPluginManager, eventIndex, stackIndex, stackValidator, eventValidator, geoIpResolver, lockProvider, cache) { }