/// <summary> /// Delete project /// </summary> private void BuildProject() { var stopWatch = Stopwatch.StartNew(); var indexId = AnalyticsProject.GetIndexIdForProject(_jobParameter.MatterId, WorkAssignment.JobId, _dataset.CollectionId, _jobParameter.ProjectCollectionId); var indexService = AnalyticsProject.GetAnalyticalEngineIndexService(_jobParameter.MatterId, WorkAssignment.JobId, indexId); AnalyticsProject.BuildProjectInAnalyticalEngine(_jobParameter.MatterId, WorkAssignment.JobId, indexService, indexId); stopWatch.Stop(); Tracer.Info("Job {0} : Time taken for build project in Analytical Engine {1} m.s ", WorkAssignment.JobId, stopWatch.ElapsedMilliseconds); }
protected override void ProcessMessage(PipeMessageEnvelope message) { try { if (string.IsNullOrEmpty(_indexId)) { _indexId = AnalyticsProject.GetIndexIdForProject(_jobParameter.MatterId, WorkAssignment.JobId, _dataset.CollectionId, _jobParameter.ProjectCollectionId); } if (_indexService == null) { //Get Indexservice _indexService = AnalyticsProject.GetAnalyticalEngineIndexService(_jobParameter.MatterId, WorkAssignment.JobId, _indexId); } var projectDocumentCollection = (ProjectDocumentCollection)message.Body; projectDocumentCollection.ShouldNotBe(null); projectDocumentCollection.Documents.ShouldNotBe(null); var documents = projectDocumentCollection.Documents.Select(projectDocument => new Business.Analytics.DocumentIdentifier { ReferenceId = projectDocument.DocumentReferenceId, DocId = projectDocument.DocId, Url = projectDocument.TextFilePath }).ToList(); _analyticProject = new AnalyticsProject(); _analyticProject.AddDocumentsInAnalyticalEngine(_jobParameter.MatterId, _dataset.CollectionId, _jobParameter, documents, _indexService, _indexId, WorkAssignment.JobId); Send(projectDocumentCollection); } catch (Exception ex) { ex.Trace().Swallow(); ReportToDirector(ex); } }