updated CommandExecutedEvent to be handled sync.

This commit is contained in:
kay.one 2013-09-16 21:52:02 -07:00
commit 48c06de098
6 changed files with 12 additions and 16 deletions

View file

@ -9,7 +9,6 @@ using NzbDrone.Core.Indexers;
using NzbDrone.Core.Instrumentation.Commands;
using NzbDrone.Core.Lifecycle;
using NzbDrone.Core.MediaFiles.Commands;
using NzbDrone.Core.Messaging;
using NzbDrone.Core.Messaging.Commands.Tracking;
using NzbDrone.Core.Messaging.Events;
using NzbDrone.Core.Providers;
@ -23,7 +22,7 @@ namespace NzbDrone.Core.Jobs
IList<ScheduledTask> GetPending();
}
public class TaskManager : ITaskManager, IHandle<ApplicationStartedEvent>, IHandleAsync<CommandExecutedEvent>, IHandleAsync<ConfigSavedEvent>
public class TaskManager : ITaskManager, IHandle<ApplicationStartedEvent>, IHandle<CommandExecutedEvent>, IHandleAsync<ConfigSavedEvent>
{
private readonly IScheduledTaskRepository _scheduledTaskRepository;
private readonly IConfigService _configService;
@ -79,7 +78,7 @@ namespace NzbDrone.Core.Jobs
}
}
public void HandleAsync(CommandExecutedEvent message)
public void Handle(CommandExecutedEvent message)
{
var scheduledTask = _scheduledTaskRepository.All().SingleOrDefault(c => c.TypeName == message.Command.GetType().FullName);
@ -97,4 +96,4 @@ namespace NzbDrone.Core.Jobs
_scheduledTaskRepository.Update(rss);
}
}
}
}