mirror of
https://github.com/jellyfin/jellyfin
synced 2024-09-19 07:41:58 +00:00
Add DbContext Pool
This commit is contained in:
parent
b9fdbaeef3
commit
d886532258
|
@ -64,12 +64,8 @@ namespace Jellyfin.Server
|
|||
Logger.LogWarning($"Skia not available. Will fallback to {nameof(NullImageEncoder)}.");
|
||||
}
|
||||
|
||||
// TODO: Set up scoping and use AddDbContextPool,
|
||||
// can't register as Transient since tracking transient in GC is funky
|
||||
// serviceCollection.AddDbContext<JellyfinDb>(
|
||||
// options => options
|
||||
// .UseSqlite($"Filename={Path.Combine(ApplicationPaths.DataPath, "jellyfin.db")}"),
|
||||
// ServiceLifetime.Transient);
|
||||
serviceCollection.AddDbContextPool<JellyfinDb>(
|
||||
options => options.UseSqlite($"Filename={Path.Combine(ApplicationPaths.DataPath, "jellyfin.db")}"));
|
||||
|
||||
serviceCollection.AddSingleton<JellyfinDbProvider>();
|
||||
|
||||
|
|
Loading…
Reference in a new issue