Add the ability to change the SQL Write Lock TimeOut (#9744)

* Add the ability to change the SQL Write Lock TimeOut

* Needed to add a default setting to to the settings for tests
This commit is contained in:
Sebastiaan Janssen
2021-02-02 16:17:59 +01:00
committed by GitHub
parent 63cf3a489d
commit 37402c5ba4
6 changed files with 46 additions and 3 deletions

View File

@@ -391,5 +391,28 @@ namespace Umbraco.Core.Configuration
}
}
}
/// <summary>
/// An int value representing the time in milliseconds to lock the database for a write operation
/// </summary>
/// <remarks>
/// The default value is 1800 milliseconds
/// </remarks>
/// <value>The timeout in milliseconds.</value>
public int SqlWriteLockTimeOut
{
get
{
try
{
return int.Parse(ConfigurationManager.AppSettings[Constants.AppSettings.SqlWriteLockTimeOut]);
}
catch
{
return 1800;
}
}
}
}
}

View File

@@ -72,5 +72,10 @@
/// Gets the location of temporary files.
/// </summary>
string LocalTempPath { get; }
/// <summary>
/// Gets the write lock timeout.
/// </summary>
int SqlWriteLockTimeOut { get; }
}
}