improvements to scheduler,

better parallelism on RSS fetch
This commit is contained in:
kay.one 2013-05-11 16:38:41 -07:00
commit a816a83f3a
12 changed files with 114 additions and 29 deletions

View file

@ -75,16 +75,23 @@ namespace NzbDrone.Common.Messaging
try
{
handlerContract.GetMethod("Execute").Invoke(handler, new object[] { command });
handlerContract.GetMethod("Execute").Invoke(handler, new object[] {command});
PublishEvent(new CommandCompletedEvent(command));
}
catch (TargetInvocationException e)
{
PublishEvent(new CommandFailedEvent(command, e));
if (e.InnerException != null)
{
throw e.InnerException;
}
throw;
}
finally
{
PublishEvent(new CommandExecutedEvent(command));
}
_logger.Debug("{0} <- {1}", command.GetType().Name, handler.GetType().Name);
}