mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
updated CommandExecutedEvent to be handled sync.
This commit is contained in:
parent
eb7dda0629
commit
48c06de098
6 changed files with 12 additions and 16 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue