signalr cleanup

This commit is contained in:
kay.one 2013-09-10 23:33:47 -07:00 committed by Keivan Beigi
parent feda4a9b67
commit 25e2c98c45
219 changed files with 2035 additions and 1495 deletions

View file

@ -3,8 +3,9 @@ using System.IO;
using NLog;
using NzbDrone.Common;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Messaging;
using NzbDrone.Core.Messaging;
using NzbDrone.Core.Update.Commands;
using NzbDrone.Core.Instrumentation;
namespace NzbDrone.Core.Update
{
@ -36,6 +37,7 @@ namespace NzbDrone.Core.Update
public void Execute(ApplicationUpdateCommand message)
{
_logger.ProgressDebug("Checking for updates");
var latestAvailable = _checkUpdateService.AvailableUpdate();
if (latestAvailable != null)
@ -58,11 +60,11 @@ namespace NzbDrone.Core.Update
_diskProvider.DeleteFolder(updateSandboxFolder, true);
}
_logger.Info("Downloading update package from [{0}] to [{1}]", updatePackage.Url, packageDestination);
_logger.ProgressInfo("Downloading Updated {0} [{1}]", updatePackage.Version, updatePackage.Branch);
_logger.Debug("Downloading update package from [{0}] to [{1}]", updatePackage.Url, packageDestination);
_httpProvider.DownloadFile(updatePackage.Url, packageDestination);
_logger.Info("Download completed for update package from [{0}]", updatePackage.FileName);
_logger.Info("Extracting Update package");
_logger.ProgressInfo("Extracting Update package");
_archiveService.Extract(packageDestination, updateSandboxFolder);
_logger.Info("Update package extracted successfully");
@ -72,6 +74,8 @@ namespace NzbDrone.Core.Update
_logger.Info("Starting update client {0}", _appFolderInfo.GetUpdateClientExePath());
_logger.ProgressInfo("NzbDrone will restart shortly.");
_processProvider.Start(_appFolderInfo.GetUpdateClientExePath(), _processProvider.GetCurrentProcess().Id.ToString());
}
catch (Exception ex)