private void SetBackupTasks() { if (!_backupTasksSet) { _backup.Add(dir => MongoBackup.Backup(_mongoDownloadAutomateManager.GetCollection(), dir)); _downloadManager.InitBackup(_backup); foreach (IServerManager server in _servers.Values) { _backup.Add(dir => server.Backup(dir)); } _backupTasksSet = true; } }
public void InitBackup(Backup backup) { backup.Add(dir => MongoBackup.Backup(_mongoDownloadedFileManager.GetCollection(), dir)); backup.Add(dir => MongoBackup.Backup(_mongoQueueDownloadFileManager.GetCollection(), dir)); backup.Add(dir => MongoBackup.Backup(_mongoCurrentDownloadFileManager.GetCollection(), dir)); }