// Enqueue a background job with single notification object for all given options public static IndexProgressPushNotification Enqueue(string currentUserName, IndexingOptions[] options) { var notification = IndexProgressHandler.CreateNotification(currentUserName, null); // Hangfire will set cancellation token. BackgroundJob.Enqueue <IndexingJobs>(j => j.IndexAllDocumentsJob(currentUserName, notification.Id, options, JobCancellationToken.Null)); return(notification); }
public IndexingJobs(IEnumerable <IndexDocumentConfiguration> documentsConfigs, IIndexingManager indexingManager, ISettingsManager settingsManager, IndexProgressHandler progressHandler, IIndexingInterceptor[] interceptors = null) { _documentsConfigs = documentsConfigs; _indexingManager = indexingManager; _settingsManager = settingsManager; _progressHandler = progressHandler; _interceptors = interceptors; }