mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Set journal_size_limit
This commit is contained in:
parent
73740f6c6e
commit
6a8d24d9e9
@ -71,6 +71,12 @@ namespace Emby.Server.Implementations.Data
|
|||||||
/// <value>The journal mode.</value>
|
/// <value>The journal mode.</value>
|
||||||
protected virtual string JournalMode => "WAL";
|
protected virtual string JournalMode => "WAL";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the journal size limit. <see href="https://www.sqlite.org/pragma.html#pragma_journal_size_limit" />.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The journal size limit.</value>
|
||||||
|
protected virtual int? JournalSizeLimit => 0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the page size.
|
/// Gets the page size.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -131,6 +137,11 @@ namespace Emby.Server.Implementations.Data
|
|||||||
WriteConnection.Execute("PRAGMA journal_mode=" + JournalMode);
|
WriteConnection.Execute("PRAGMA journal_mode=" + JournalMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (JournalSizeLimit.HasValue)
|
||||||
|
{
|
||||||
|
WriteConnection.Execute("PRAGMA journal_size_limit=" + (int)JournalSizeLimit.Value);
|
||||||
|
}
|
||||||
|
|
||||||
if (Synchronous.HasValue)
|
if (Synchronous.HasValue)
|
||||||
{
|
{
|
||||||
WriteConnection.Execute("PRAGMA synchronous=" + (int)Synchronous.Value);
|
WriteConnection.Execute("PRAGMA synchronous=" + (int)Synchronous.Value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user