Ensure drone factory runs on its specificed interval (#1067)

* Ensure drone factory runs on its specificed interval
* Fix the tests for DownloadedMovieImportServiceFixture
This commit is contained in:
Tim Turner
2017-03-08 16:07:51 -05:00
committed by GitHub
parent fe0a54685f
commit 5c22d0b61d
28 changed files with 625 additions and 69 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using NLog;
@@ -94,9 +94,9 @@ namespace NzbDrone.Core.Jobs
new ScheduledTask
{
Interval = _configService.DownloadedEpisodesScanInterval,
TypeName = typeof(DownloadedEpisodesScanCommand).FullName
//TypeName = typeof(DownloadedMovieScanCommand).FullName
Interval = _configService.DownloadedMoviesScanInterval,
//TypeName = typeof(DownloadedEpisodesScanCommand).FullName
TypeName = typeof(DownloadedMoviesScanCommand).FullName
},
};
@@ -178,13 +178,13 @@ namespace NzbDrone.Core.Jobs
var rss = _scheduledTaskRepository.GetDefinition(typeof(RssSyncCommand));
rss.Interval = _configService.RssSyncInterval;
var downloadedEpisodes = _scheduledTaskRepository.GetDefinition(typeof(DownloadedEpisodesScanCommand));
downloadedEpisodes.Interval = _configService.DownloadedEpisodesScanInterval;
var downloadedMovies = _scheduledTaskRepository.GetDefinition(typeof(DownloadedMoviesScanCommand));
downloadedMovies.Interval = _configService.DownloadedMoviesScanInterval;
var netImport = _scheduledTaskRepository.GetDefinition(typeof(NetImportSyncCommand));
netImport.Interval = _configService.NetImportSyncInterval;
_scheduledTaskRepository.UpdateMany(new List<ScheduledTask> { rss, downloadedEpisodes, netImport });
_scheduledTaskRepository.UpdateMany(new List<ScheduledTask> { rss, downloadedMovies, netImport });
}
}
}