public List <TaskExecutionResult> ExecuteTasks(IList <IExecutableTask> list)
        {
            _taskStatusUpdater.BeginExecution(list);
            List <LuceneAction> luceneActions =
                list.Select(task => task as ILuceneIndexTask)
                .SelectMany(task => task.GetActions())
                .Distinct(LuceneActionComparison.Comparer)
                .ToList();

            LuceneActionExecutor.PerformActions(_indexService, luceneActions);
            List <TaskExecutionResult> results = list.Select(TaskExecutionResult.Successful).ToList();

            _taskStatusUpdater.CompleteExecution(results);
            return(results);
        }
Пример #2
0
        protected override void OnExecute()
        {
            List <LuceneAction> luceneActions = GetActions().ToList();

            LuceneActionExecutor.PerformActions(_indexService, luceneActions);
        }