New: Store Task StartTime, Show Duration in UI

This commit is contained in:
Qstick
2020-02-19 20:27:25 +00:00
committed by ta264
parent 04378c8ecc
commit b319c44bbd
12 changed files with 57 additions and 8 deletions
@@ -19,7 +19,7 @@ namespace NzbDrone.Core.Messaging.Commands
where TCommand : Command;
CommandModel Push<TCommand>(TCommand command, CommandPriority priority = CommandPriority.Normal, CommandTrigger trigger = CommandTrigger.Unspecified)
where TCommand : Command;
CommandModel Push(string commandName, DateTime? lastExecutionTime, CommandPriority priority = CommandPriority.Normal, CommandTrigger trigger = CommandTrigger.Unspecified);
CommandModel Push(string commandName, DateTime? lastExecutionTime, DateTime? lastStartTime, CommandPriority priority = CommandPriority.Normal, CommandTrigger trigger = CommandTrigger.Unspecified);
IEnumerable<CommandModel> Queue(CancellationToken cancellationToken);
List<CommandModel> All();
CommandModel Get(int id);
@@ -128,10 +128,11 @@ namespace NzbDrone.Core.Messaging.Commands
return commandModel;
}
public CommandModel Push(string commandName, DateTime? lastExecutionTime, CommandPriority priority = CommandPriority.Normal, CommandTrigger trigger = CommandTrigger.Unspecified)
public CommandModel Push(string commandName, DateTime? lastExecutionTime, DateTime? lastStartTime, CommandPriority priority = CommandPriority.Normal, CommandTrigger trigger = CommandTrigger.Unspecified)
{
dynamic command = GetCommand(commandName);
command.LastExecutionTime = lastExecutionTime;
command.LastStartTime = lastStartTime;
command.Trigger = trigger;
return Push(command, priority, trigger);