mirror of
https://github.com/Radarr/Radarr
synced 2024-12-25 17:27:59 +00:00
Added BuildDateTime to central dispatch
This commit is contained in:
parent
b6360eba26
commit
1ba959298b
3 changed files with 21 additions and 1 deletions
|
@ -90,5 +90,11 @@ public void get_version()
|
||||||
{
|
{
|
||||||
CentralDispatch.Version.Should().NotBeNull();
|
CentralDispatch.Version.Should().NotBeNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void BuildDate_should_be_today()
|
||||||
|
{
|
||||||
|
CentralDispatch.BuildDateTime.Should().BeWithin(TimeSpan.FromHours(10));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,17 @@ public static Version Version
|
||||||
get { return Assembly.GetExecutingAssembly().GetName().Version; }
|
get { return Assembly.GetExecutingAssembly().GetName().Version; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static DateTime BuildDateTime
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var fileLocation = Assembly.GetCallingAssembly().Location;
|
||||||
|
return new FileInfo(fileLocation).CreationTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public static String AppPath
|
public static String AppPath
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -53,12 +64,13 @@ public static StandardKernel NinjectKernel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void InitializeApp()
|
public static void InitializeApp()
|
||||||
{
|
{
|
||||||
BindKernel();
|
BindKernel();
|
||||||
|
|
||||||
MigrationsHelper.Run(Connection.MainConnectionString, true);
|
MigrationsHelper.Run(Connection.MainConnectionString, true);
|
||||||
|
|
||||||
LogConfiguration.StartDbLogging();
|
LogConfiguration.StartDbLogging();
|
||||||
|
|
||||||
_kernel.Get<QualityProvider>().SetupDefaultProfiles();
|
_kernel.Get<QualityProvider>().SetupDefaultProfiles();
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using NLog;
|
||||||
using Ninject;
|
using Ninject;
|
||||||
using NzbDrone.Model;
|
using NzbDrone.Model;
|
||||||
using NzbDrone.Providers;
|
using NzbDrone.Providers;
|
||||||
|
@ -12,6 +13,7 @@ namespace NzbDrone
|
||||||
public static class CentralDispatch
|
public static class CentralDispatch
|
||||||
{
|
{
|
||||||
private static StandardKernel _kernel;
|
private static StandardKernel _kernel;
|
||||||
|
private static readonly Logger Logger = LogManager.GetLogger("Host.CentralDispatch");
|
||||||
|
|
||||||
static CentralDispatch()
|
static CentralDispatch()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue