update interval for existing tasks.
This commit is contained in:
parent
8e89847f30
commit
4a8139f5ba
|
@ -60,14 +60,11 @@ namespace NzbDrone.Core.Jobs
|
||||||
|
|
||||||
foreach (var defaultTask in defaultTasks)
|
foreach (var defaultTask in defaultTasks)
|
||||||
{
|
{
|
||||||
var currentDefinition = currentTasks.SingleOrDefault(c => c.TypeName == defaultTask.TypeName);
|
var currentDefinition = currentTasks.SingleOrDefault(c => c.TypeName == defaultTask.TypeName) ?? defaultTask;
|
||||||
|
|
||||||
if (currentDefinition == null)
|
currentDefinition.Interval = defaultTask.Interval;
|
||||||
{
|
|
||||||
currentDefinition = defaultTask;
|
|
||||||
_scheduledTaskRepository.Upsert(currentDefinition);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
_scheduledTaskRepository.Upsert(currentDefinition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue