Skip to content

Commit

Permalink
Files: added feature for remove elastic
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelbannov committed Nov 1, 2021
1 parent fb75330 commit b681b82
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions products/ASC.Files/Service/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,27 @@ public static IHostBuilder CreateHostBuilder(string[] args) =>
diHelper.TryAdd(typeof(ICacheNotify<>), typeof(KafkaCache<>));

diHelper.RegisterProducts(hostContext.Configuration, hostContext.HostingEnvironment.ContentRootPath);
services.AddHostedService<ServiceLauncher>();
diHelper.TryAdd<ServiceLauncher>();

if (!bool.TryParse(hostContext.Configuration["disable_elastic"], out var disableElastic))
{
disableElastic = false;
}

if (!disableElastic)
{
services.AddHostedService<ServiceLauncher>();
diHelper.TryAdd<ServiceLauncher>();
//diHelper.TryAdd<FileConverter>();
diHelper.TryAdd<FactoryIndexerFile>();
diHelper.TryAdd<FactoryIndexerFolder>();
}

services.AddHostedService<FeedAggregatorService>();
diHelper.TryAdd<FeedAggregatorService>();

services.AddHostedService<Launcher>();
diHelper.TryAdd<Launcher>();

//diHelper.TryAdd<FileConverter>();
diHelper.TryAdd<FactoryIndexerFile>();
diHelper.TryAdd<FactoryIndexerFolder>();
})
.ConfigureContainer<ContainerBuilder>((context, builder) =>
{
Expand Down

0 comments on commit b681b82

Please sign in to comment.