mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-18 21:35:51 -04:00
Added extra logging to update/ProcessProvider
This commit is contained in:
@@ -84,21 +84,22 @@ namespace NzbDrone.Update
|
||||
VerfityArguments(args);
|
||||
int processId = ParseProcessId(args);
|
||||
|
||||
FileInfo exeFileInfo = new FileInfo(_processProvider.GetProcessById(processId).StartPath);
|
||||
string appPath = exeFileInfo.Directory.FullName;
|
||||
var exeFileInfo = new FileInfo(_processProvider.GetProcessById(processId).StartPath);
|
||||
string targetFolder = exeFileInfo.Directory.FullName;
|
||||
|
||||
logger.Info("Starting update process");
|
||||
_updateProvider.Start(appPath);
|
||||
logger.Info("Starting update process. Target Path:{0}", targetFolder);
|
||||
_updateProvider.Start(targetFolder);
|
||||
}
|
||||
|
||||
private int ParseProcessId(string[] args)
|
||||
{
|
||||
int id = 0;
|
||||
int id;
|
||||
if (!Int32.TryParse(args[0], out id) || id <= 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("Invalid process id: " + args[0]);
|
||||
}
|
||||
|
||||
logger.Debug("NzbDrone processId:{0}", id);
|
||||
return id;
|
||||
}
|
||||
|
||||
@@ -106,6 +107,8 @@ namespace NzbDrone.Update
|
||||
{
|
||||
if (args == null || args.Length != 2)
|
||||
throw new ArgumentException("Wrong number of parameters were passed in.");
|
||||
|
||||
logger.Debug("Arguments verified. [{0}] , [{1}]", args[0], args[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user