mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Disk scan is much much much much faster.
This commit is contained in:
parent
c21ff235b6
commit
b676f868ce
10 changed files with 112 additions and 81 deletions
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using NLog;
|
||||
|
@ -83,9 +84,12 @@ namespace NzbDrone.Common.Messaging
|
|||
|
||||
_logger.Debug("{0} -> {1}", command.GetType().Name, handler.GetType().Name);
|
||||
|
||||
var sw = Stopwatch.StartNew();
|
||||
|
||||
try
|
||||
{
|
||||
handler.Execute(command);
|
||||
sw.Stop();
|
||||
PublishEvent(new CommandCompletedEvent(command));
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -98,7 +102,7 @@ namespace NzbDrone.Common.Messaging
|
|||
PublishEvent(new CommandExecutedEvent(command));
|
||||
}
|
||||
|
||||
_logger.Debug("{0} <- {1}", command.GetType().Name, handler.GetType().Name);
|
||||
_logger.Debug("{0} <- {1} [{2}]", command.GetType().Name, handler.GetType().Name, sw.Elapsed.ToString(""));
|
||||
}
|
||||
|
||||
public void PublishCommand(string commandTypeName)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue