mirror of
https://github.com/Radarr/Radarr
synced 2024-12-27 02:09:59 +00:00
update interval for existing tasks.
This commit is contained in:
parent
8e89847f30
commit
4a8139f5ba
1 changed files with 3 additions and 6 deletions
|
@ -60,15 +60,12 @@ public void Handle(ApplicationStartedEvent message)
|
|||
|
||||
foreach (var defaultTask in defaultTasks)
|
||||
{
|
||||
var currentDefinition = currentTasks.SingleOrDefault(c => c.TypeName == defaultTask.TypeName);
|
||||
var currentDefinition = currentTasks.SingleOrDefault(c => c.TypeName == defaultTask.TypeName) ?? defaultTask;
|
||||
|
||||
currentDefinition.Interval = defaultTask.Interval;
|
||||
|
||||
if (currentDefinition == null)
|
||||
{
|
||||
currentDefinition = defaultTask;
|
||||
_scheduledTaskRepository.Upsert(currentDefinition);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void HandleAsync(CommandExecutedEvent message)
|
||||
|
|
Loading…
Reference in a new issue