Skip to content

Commit

Permalink
Made dbcontext and repository transient in bot-runner
Browse files Browse the repository at this point in the history
  • Loading branch information
szv committed Jun 25, 2023
1 parent 26c624d commit 723de53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Services/Bot/src/Runner/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
#if DEBUG
dbBuilder.EnableSensitiveDataLogging();
#endif
});
}, ServiceLifetime.Transient);
services.Configure<BotScheduleWorkerOptions>(context.Configuration.GetSection("BotService:BotScheduleWorker"));
services.AddScoped<IBotRepository, BotRepository>();
services.AddScoped<IBotConsumer, BotConsumer>();
services.AddTransient<IBotRepository, BotRepository>();
services.AddSingleton<IBotConsumer, BotConsumer>();
services.AddHttpClient<IGameTypeService, GameTypeService>(options =>
{
options.BaseAddress = new(context.Configuration.GetRequired("BotService:GameTypeBaseAddress"));
Expand Down

0 comments on commit 723de53

Please sign in to comment.