ScheduledTasks properly set last run time now
This commit is contained in:
parent
c96ba5efd3
commit
1e7db2287e
|
@ -20,17 +20,17 @@ namespace NzbDrone.Api.Commands
|
|||
|
||||
public void HandleAsync(CommandStartedEvent message)
|
||||
{
|
||||
BroadcastMessage(message.Command);
|
||||
BroadcastMessage(message.TrackedCommand);
|
||||
}
|
||||
|
||||
public void HandleAsync(CommandCompletedEvent message)
|
||||
{
|
||||
BroadcastMessage(message.Command);
|
||||
BroadcastMessage(message.TrackedCommand);
|
||||
}
|
||||
|
||||
public void Handle(CommandFailedEvent message)
|
||||
{
|
||||
BroadcastMessage(message.Command);
|
||||
BroadcastMessage(message.TrackedCommand);
|
||||
}
|
||||
|
||||
private void BroadcastMessage(TrackedCommand trackedCommand)
|
||||
|
|
|
@ -4,11 +4,11 @@ namespace NzbDrone.Common.Messaging.Events
|
|||
{
|
||||
public class CommandCompletedEvent : IEvent
|
||||
{
|
||||
public TrackedCommand Command { get; private set; }
|
||||
public TrackedCommand TrackedCommand { get; private set; }
|
||||
|
||||
public CommandCompletedEvent(TrackedCommand command)
|
||||
public CommandCompletedEvent(TrackedCommand trackedCommand)
|
||||
{
|
||||
Command = command;
|
||||
TrackedCommand = trackedCommand;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,11 +4,11 @@ namespace NzbDrone.Common.Messaging.Events
|
|||
{
|
||||
public class CommandExecutedEvent : IEvent
|
||||
{
|
||||
public TrackedCommand Command { get; private set; }
|
||||
public TrackedCommand TrackedCommand { get; private set; }
|
||||
|
||||
public CommandExecutedEvent(TrackedCommand command)
|
||||
public CommandExecutedEvent(TrackedCommand trackedCommand)
|
||||
{
|
||||
Command = command;
|
||||
TrackedCommand = trackedCommand;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,12 +5,12 @@ namespace NzbDrone.Common.Messaging.Events
|
|||
{
|
||||
public class CommandFailedEvent : IEvent
|
||||
{
|
||||
public TrackedCommand Command { get; private set; }
|
||||
public TrackedCommand TrackedCommand { get; private set; }
|
||||
public Exception Exception { get; private set; }
|
||||
|
||||
public CommandFailedEvent(TrackedCommand command, Exception exception)
|
||||
public CommandFailedEvent(TrackedCommand trackedCommand, Exception exception)
|
||||
{
|
||||
Command = command;
|
||||
TrackedCommand = trackedCommand;
|
||||
Exception = exception;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,11 +4,11 @@ namespace NzbDrone.Common.Messaging.Events
|
|||
{
|
||||
public class CommandStartedEvent : IEvent
|
||||
{
|
||||
public TrackedCommand Command { get; private set; }
|
||||
public TrackedCommand TrackedCommand { get; private set; }
|
||||
|
||||
public CommandStartedEvent(TrackedCommand command)
|
||||
public CommandStartedEvent(TrackedCommand trackedCommand)
|
||||
{
|
||||
Command = command;
|
||||
TrackedCommand = trackedCommand;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -79,7 +79,7 @@ namespace NzbDrone.Core.Jobs
|
|||
|
||||
public void HandleAsync(CommandExecutedEvent message)
|
||||
{
|
||||
var scheduledTask = _scheduledTaskRepository.All().SingleOrDefault(c => c.TypeName == message.Command.GetType().FullName);
|
||||
var scheduledTask = _scheduledTaskRepository.All().SingleOrDefault(c => c.TypeName == message.TrackedCommand.Command.GetType().FullName);
|
||||
|
||||
if (scheduledTask != null)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue