mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04: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)}.");
|
Logger.LogWarning($"Skia not available. Will fallback to {nameof(NullImageEncoder)}.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Set up scoping and use AddDbContextPool,
|
serviceCollection.AddDbContextPool<JellyfinDb>(
|
||||||
// can't register as Transient since tracking transient in GC is funky
|
options => options.UseSqlite($"Filename={Path.Combine(ApplicationPaths.DataPath, "jellyfin.db")}"));
|
||||||
// serviceCollection.AddDbContext<JellyfinDb>(
|
|
||||||
// options => options
|
|
||||||
// .UseSqlite($"Filename={Path.Combine(ApplicationPaths.DataPath, "jellyfin.db")}"),
|
|
||||||
// ServiceLifetime.Transient);
|
|
||||||
|
|
||||||
serviceCollection.AddSingleton<JellyfinDbProvider>();
|
serviceCollection.AddSingleton<JellyfinDbProvider>();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user