mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
More logging for CommandExecutor
This commit is contained in:
parent
49718fbfbe
commit
aae3970865
@ -48,12 +48,12 @@ private void ExecuteCommands()
|
||||
}
|
||||
catch (ThreadAbortException ex)
|
||||
{
|
||||
_logger.ErrorException(ex.Message, ex);
|
||||
_logger.ErrorException("Thread aborted: " + ex.Message, ex);
|
||||
Thread.ResetAbort();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error(ex.Message, ex);
|
||||
_logger.Error("Unknown error in thread: " + ex.Message, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,6 +80,7 @@ private void ExecuteCommand<TCommand>(TCommand command, CommandModel commandMode
|
||||
}
|
||||
catch (CommandFailedException ex)
|
||||
{
|
||||
_commandQueueManager.SetMessage(commandModel, "Failed");
|
||||
_commandQueueManager.Fail(commandModel, ex.Message, ex);
|
||||
throw;
|
||||
}
|
||||
|
@ -150,7 +150,6 @@ public void Requeue()
|
||||
public void CleanCommands()
|
||||
{
|
||||
_logger.Trace("Cleaning up old commands");
|
||||
_repo.Trim();
|
||||
|
||||
var old = _commandCache.Values.Where(c => c.EndedAt < DateTime.UtcNow.AddMinutes(5));
|
||||
|
||||
@ -158,6 +157,8 @@ public void CleanCommands()
|
||||
{
|
||||
_commandCache.Remove(command.Id.ToString());
|
||||
}
|
||||
|
||||
_repo.Trim();
|
||||
}
|
||||
|
||||
private dynamic GetCommand(string commandName)
|
||||
|
@ -77,7 +77,7 @@ public void Start(CommandModel command)
|
||||
|
||||
public void End(CommandModel command)
|
||||
{
|
||||
SetFields(command, c => c.EndedAt, c => c.Status, c => c.Duration);
|
||||
SetFields(command, c => c.EndedAt, c => c.Status, c => c.Duration, c => c.Exception);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user