mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04:00
reduce repeated deserialization
This commit is contained in:
parent
00634b62c5
commit
43bcf7ba1d
@ -106,6 +106,7 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks
|
|||||||
InitTriggerEvents();
|
InitTriggerEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool _readFromFile = false;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The _last execution result
|
/// The _last execution result
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -126,7 +127,7 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks
|
|||||||
|
|
||||||
lock (_lastExecutionResultSyncLock)
|
lock (_lastExecutionResultSyncLock)
|
||||||
{
|
{
|
||||||
if (_lastExecutionResult == null)
|
if (_lastExecutionResult == null && !_readFromFile)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -144,6 +145,7 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks
|
|||||||
{
|
{
|
||||||
Logger.ErrorException("Error deserializing {0}", ex, path);
|
Logger.ErrorException("Error deserializing {0}", ex, path);
|
||||||
}
|
}
|
||||||
|
_readFromFile = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user