public void HandleAsync(ConfigSavedEvent message) { var rss = _scheduledTaskRepository.GetDefinition(typeof(RssSyncCommand)); rss.Interval = GetRssSyncInterval(); var importList = _scheduledTaskRepository.GetDefinition(typeof(ImportListSyncCommand)); importList.Interval = GetImportListSyncInterval(); var backup = _scheduledTaskRepository.GetDefinition(typeof(BackupCommand)); backup.Interval = GetBackupInterval(); var refreshMonitoredDownloads = _scheduledTaskRepository.GetDefinition(typeof(RefreshMonitoredDownloadsCommand)); refreshMonitoredDownloads.Interval = _configService.CheckForFinishedDownloadInterval; _scheduledTaskRepository.UpdateMany(new List <ScheduledTask> { rss, importList, refreshMonitoredDownloads, backup }); _cache.Find(rss.TypeName).Interval = rss.Interval; _cache.Find(importList.TypeName).Interval = importList.Interval; _cache.Find(backup.TypeName).Interval = backup.Interval; }
public void HandleAsync(ConfigSavedEvent message) { var rss = _scheduledTaskRepository.GetDefinition(typeof(RssSyncCommand)); rss.Interval = _configService.RssSyncInterval; _scheduledTaskRepository.Update(rss); }
public void HandleAsync(ConfigSavedEvent message) { var backup = _scheduledTaskRepository.GetDefinition(typeof(BackupCommand)); backup.Interval = GetBackupInterval(); _scheduledTaskRepository.UpdateMany(new List <ScheduledTask> { backup }); _cache.Find(backup.TypeName).Interval = backup.Interval; }
public void HandleAsync(ConfigSavedEvent message) { var rss = _scheduledTaskRepository.GetDefinition(typeof(RssSyncCommand)); rss.Interval = _configService.RssSyncInterval; var downloadedEpisodes = _scheduledTaskRepository.GetDefinition(typeof(DownloadedEpisodesScanCommand)); downloadedEpisodes.Interval = _configService.DownloadedEpisodesScanInterval; _scheduledTaskRepository.UpdateMany(new List <ScheduledTask> { rss, downloadedEpisodes }); }
public void HandleAsync(ConfigSavedEvent message) { var rss = _scheduledTaskRepository.GetDefinition(typeof(RssSyncCommand)); rss.Interval = GetRssSyncInterval(); var backup = _scheduledTaskRepository.GetDefinition(typeof(BackupCommand)); backup.Interval = GetBackupInterval(); _scheduledTaskRepository.UpdateMany(new List <ScheduledTask> { rss, backup }); }
public void Handle(ConfigSavedEvent message) { var oldWatch = _watchForChanges; _watchForChanges = _configService.WatchLibraryForChanges; if (_watchForChanges != oldWatch) { if (_watchForChanges) { _rootFolderService.All().ForEach(x => StartWatchingPath(x.Path)); } else { _rootFolderService.All().ForEach(x => StopWatchingPath(x.Path)); } } }
public void HandleAsync(ConfigSavedEvent message) { var rss = _scheduledTaskRepository.GetDefinition(typeof(RssSyncCommand)); rss.Interval = _configService.RssSyncInterval; var downloadedMovies = _scheduledTaskRepository.GetDefinition(typeof(DownloadedMoviesScanCommand)); downloadedMovies.Interval = _configService.DownloadedMoviesScanInterval; var netImport = _scheduledTaskRepository.GetDefinition(typeof(NetImportSyncCommand)); netImport.Interval = _configService.NetImportSyncInterval; var checkForFinishedDownloads = _scheduledTaskRepository.GetDefinition(typeof(CheckForFinishedDownloadCommand)); checkForFinishedDownloads.Interval = _configService.CheckForFinishedDownloadInterval; _scheduledTaskRepository.UpdateMany(new List <ScheduledTask> { rss, downloadedMovies, netImport, checkForFinishedDownloads }); }
public void Accept(ConfigSavedEvent evt) { this.OnConfigSaved(evt.Data); }
public void HandleAsync(ConfigSavedEvent message) { PerformHealthCheck(c => c.CheckOnConfigChange); }