Timers are now initialized on startup.

This commit is contained in:
kay.one 2011-04-19 19:17:28 -07:00
commit 6caae19430
4 changed files with 96 additions and 0 deletions

View file

@ -109,9 +109,12 @@ namespace NzbDrone.Core
SetupDefaultQualityProfiles(_kernel.Get<IRepository>()); //Setup the default QualityProfiles on start-up
BindIndexers();
BindTimers();
}
}
private static void BindIndexers()
{
_kernel.Bind<IndexerProviderBase>().To<NzbsOrgProvider>().InSingletonScope();
@ -122,6 +125,12 @@ namespace NzbDrone.Core
_kernel.Get<IndexerProvider>().InitializeIndexers(indexers.ToList());
}
private static void BindTimers()
{
_kernel.Bind<ITimer>().To<RssSyncTimer>().InTransientScope();
_kernel.Get<TimerProvider>().Initialize();
}
private static void ForceMigration(IRepository repository)
{
repository.GetPaged<Series>(0, 1);