Esempio n. 1
0
        public List <TaskExecutionResult> ExecuteTasks(IList <AdHocTask> 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);
        }
Esempio n. 2
0
        protected override void OnExecute()
        {
            List <LuceneAction> luceneActions = GetActions().ToList();

            LuceneActionExecutor.PerformActions(_indexService, luceneActions);
        }