Fixed tooltip for pending queue items.

This commit is contained in:
Taloth Saldono
2015-02-22 22:09:06 +01:00
parent a3d649452f
commit 2da23ae230
3 changed files with 23 additions and 3 deletions

View File

@@ -24,6 +24,7 @@ namespace NzbDrone.Core.Jobs
{
IList<ScheduledTask> GetPending();
List<ScheduledTask> GetAll();
DateTime GetNextExecution(Type type);
}
public class TaskManager : ITaskManager, IHandle<ApplicationStartedEvent>, IHandle<CommandExecutedEvent>, IHandleAsync<ConfigSavedEvent>
@@ -51,6 +52,12 @@ namespace NzbDrone.Core.Jobs
return _scheduledTaskRepository.All().ToList();
}
public DateTime GetNextExecution(Type type)
{
var scheduledTask = _scheduledTaskRepository.All().Single(v => v.TypeName == type.FullName);
return scheduledTask.LastExecution.AddMinutes(scheduledTask.Interval);
}
public void Handle(ApplicationStartedEvent message)
{
var defaultTasks = new[]