mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Merge pull request #1905 from MediaBrowser/dev
reduce repeated deserialization
This commit is contained in:
commit
9cf815214f
@ -106,6 +106,7 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks
|
||||
InitTriggerEvents();
|
||||
}
|
||||
|
||||
private bool _readFromFile = false;
|
||||
/// <summary>
|
||||
/// The _last execution result
|
||||
/// </summary>
|
||||
@ -126,7 +127,7 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks
|
||||
|
||||
lock (_lastExecutionResultSyncLock)
|
||||
{
|
||||
if (_lastExecutionResult == null)
|
||||
if (_lastExecutionResult == null && !_readFromFile)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -144,6 +145,7 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks
|
||||
{
|
||||
Logger.ErrorException("Error deserializing {0}", ex, path);
|
||||
}
|
||||
_readFromFile = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user