From 390dfbdee8db4298719ec6a10281af654e91c24c Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Sun, 6 Nov 2011 22:38:07 -0800 Subject: [PATCH] Fixed startup issue. --- NzbDrone.Core/CentralDispatch.cs | 2 ++ NzbDrone.Core/Fluent.cs | 2 ++ NzbDrone.Core/Providers/Jobs/JobProvider.cs | 2 +- NzbDrone.Web/Global.asax.cs | 1 - 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/NzbDrone.Core/CentralDispatch.cs b/NzbDrone.Core/CentralDispatch.cs index 48e04fb80..a10440fcc 100644 --- a/NzbDrone.Core/CentralDispatch.cs +++ b/NzbDrone.Core/CentralDispatch.cs @@ -39,6 +39,8 @@ namespace NzbDrone.Core { BindKernel(); + _kernel.Get().Setup(); + var mainConnectionString = _kernel.Get().MainConnectionString; MigrationsHelper.Run(mainConnectionString, true); diff --git a/NzbDrone.Core/Fluent.cs b/NzbDrone.Core/Fluent.cs index 112249cd3..317acdb43 100644 --- a/NzbDrone.Core/Fluent.cs +++ b/NzbDrone.Core/Fluent.cs @@ -54,6 +54,8 @@ namespace NzbDrone.Core return dateTime.ToShortDateString(); } + + //TODO: this should be moved to DiskProvider public static ulong FreeDiskSpace(this DirectoryInfo directoryInfo) { ulong freeBytesAvailable; diff --git a/NzbDrone.Core/Providers/Jobs/JobProvider.cs b/NzbDrone.Core/Providers/Jobs/JobProvider.cs index 2509077ac..97690a4eb 100644 --- a/NzbDrone.Core/Providers/Jobs/JobProvider.cs +++ b/NzbDrone.Core/Providers/Jobs/JobProvider.cs @@ -274,7 +274,7 @@ namespace NzbDrone.Core.Providers.Jobs settings.Success = true; sw.Stop(); - logger.Debug("Job '{0}' successfully completed in {1:0}.{2} seconds.", queueItem, sw.Elapsed.TotalSeconds, sw.Elapsed.Milliseconds / 100, + logger.Debug("Job {0} successfully completed in {1:0}.{2} seconds.", queueItem, sw.Elapsed.TotalSeconds, sw.Elapsed.Milliseconds / 100, sw.Elapsed.Seconds); } catch (ThreadAbortException) diff --git a/NzbDrone.Web/Global.asax.cs b/NzbDrone.Web/Global.asax.cs index 906410b98..7c6a2ff9a 100644 --- a/NzbDrone.Web/Global.asax.cs +++ b/NzbDrone.Web/Global.asax.cs @@ -55,7 +55,6 @@ namespace NzbDrone.Web protected override IKernel CreateKernel() { var kernel = CentralDispatch.NinjectKernel; - kernel.Get().Setup(); Logger.Info("NZBDrone Starting up."); CentralDispatch.DedicateToHost();