mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-02 00:12:24 +00:00
update connections
This commit is contained in:
@@ -27,6 +27,14 @@ namespace Emby.Server.Implementations.Activity
|
||||
{
|
||||
using (var connection = CreateConnection())
|
||||
{
|
||||
connection.ExecuteAll(string.Join(";", new[]
|
||||
{
|
||||
"pragma default_temp_store = memory",
|
||||
"pragma default_synchronous=Normal",
|
||||
"pragma temp_store = memory",
|
||||
"pragma synchronous=Normal",
|
||||
}));
|
||||
|
||||
string[] queries = {
|
||||
|
||||
"create table if not exists ActivityLogEntries (Id GUID PRIMARY KEY, Name TEXT, Overview TEXT, ShortOverview TEXT, Type TEXT, ItemId TEXT, UserId TEXT, DateCreated DATETIME, LogSeverity TEXT)",
|
||||
@@ -51,9 +59,9 @@ namespace Emby.Server.Implementations.Activity
|
||||
throw new ArgumentNullException("entry");
|
||||
}
|
||||
|
||||
using (WriteLock.Write())
|
||||
using (var connection = CreateConnection())
|
||||
{
|
||||
using (var connection = CreateConnection())
|
||||
using (WriteLock.Write())
|
||||
{
|
||||
connection.RunInTransaction(db =>
|
||||
{
|
||||
@@ -79,9 +87,9 @@ namespace Emby.Server.Implementations.Activity
|
||||
|
||||
public QueryResult<ActivityLogEntry> GetActivityLogEntries(DateTime? minDate, int? startIndex, int? limit)
|
||||
{
|
||||
using (WriteLock.Read())
|
||||
using (var connection = CreateConnection(true))
|
||||
{
|
||||
using (var connection = CreateConnection(true))
|
||||
using (WriteLock.Read())
|
||||
{
|
||||
var commandText = BaseActivitySelectText;
|
||||
var whereClauses = new List<string>();
|
||||
|
||||
Reference in New Issue
Block a user