From 52ff79fb28a845c807113123834ae626e8ba3457 Mon Sep 17 00:00:00 2001 From: Cody Rodgers Date: Fri, 31 Mar 2023 12:26:31 -0700 Subject: [PATCH] V10.2.0.3 (#16) * Fixed broken DXF configuration content for labels/folders * Add more error handling to the folder and labels property value readers * Fix bug preventing new labels from being synced * Remove automatic re-indexing from the videos/playlists pipeline --------- Co-authored-by: Cody Rodgers --- .../GetPlayListsPipelineStepProcessor.cs | 20 ------------------ .../GetVideosPipelineStepProcessor.cs | 21 ------------------- .../UpdateLabelModelPipelineStepProcessor.cs | 13 ++---------- .../ValueReaders/FolderPropertyValueReader.cs | 6 ++++++ .../ValueReaders/LabelsPropertyValueReader.cs | 8 ++++++- .../Folder Property.yml | 4 ++++ .../Labels Property.yml | 3 +++ .../Resolve Folder Model.yml | 9 ++++++++ .../Update Folder Model.yml | 9 ++++++++ .../Resolve Label Model.yml | 6 ++++++ .../Update Label Model.yml | 6 ++++++ .../Brightcove Video Data/Labels.yml | 2 +- 12 files changed, 53 insertions(+), 54 deletions(-) diff --git a/Brightcove.DataExchangeFramework/Processors/GetPlayListsPipelineStepProcessor.cs b/Brightcove.DataExchangeFramework/Processors/GetPlayListsPipelineStepProcessor.cs index 124b8406..02328b0c 100644 --- a/Brightcove.DataExchangeFramework/Processors/GetPlayListsPipelineStepProcessor.cs +++ b/Brightcove.DataExchangeFramework/Processors/GetPlayListsPipelineStepProcessor.cs @@ -25,10 +25,6 @@ class GetPlayListsPipelineStepProcessor : BasePipelineStepWithWebApiEndpointProc protected override void ProcessPipelineStep(PipelineStep pipelineStep = null, PipelineContext pipelineContext = null, ILogger logger = null) { base.ProcessPipelineStep(pipelineStep, pipelineContext, logger); - - //We may need to refresh the search index before syncing - RefreshSearchIndex(pipelineStep); - service = new BrightcoveService(WebApiSettings.AccountId, WebApiSettings.ClientId, WebApiSettings.ClientSecret); var data = this.GetIterableData(WebApiSettings, pipelineStep); @@ -54,21 +50,5 @@ protected virtual IEnumerable GetIterableData(WebApiSettings settings, } } } - - private void RefreshSearchIndex(PipelineStep pipelineStep) - { - Item videosFolder = Sitecore.Data.Database.GetDatabase("master").GetItem(WebApiSettings.AccountItem.Paths.FullPath + "/Videos"); - - Logger.Debug($"Started refreshing the search index before syncing videos... (pipeline step: {pipelineStep.Name})"); - - var jobs = Sitecore.ContentSearch.Maintenance.IndexCustodian.RefreshTree((SitecoreIndexableItem)videosFolder); - - foreach (var job in jobs) - { - job.Wait(); - } - - Logger.Debug($"Finished refreshing the search index (pipeline step: {pipelineStep.Name})"); - } } } diff --git a/Brightcove.DataExchangeFramework/Processors/GetVideosPipelineStepProcessor.cs b/Brightcove.DataExchangeFramework/Processors/GetVideosPipelineStepProcessor.cs index d4669f1d..07d8487f 100644 --- a/Brightcove.DataExchangeFramework/Processors/GetVideosPipelineStepProcessor.cs +++ b/Brightcove.DataExchangeFramework/Processors/GetVideosPipelineStepProcessor.cs @@ -28,9 +28,6 @@ protected override void ProcessPipelineStep(PipelineStep pipelineStep = null, Pi { base.ProcessPipelineStep(pipelineStep, pipelineContext, logger); - //We may need to refresh the search index before syncing - RefreshSearchIndex(pipelineStep); - service = new BrightcoveService(WebApiSettings.AccountId, WebApiSettings.ClientId, WebApiSettings.ClientSecret); var data = GetIterableData(pipelineStep); @@ -56,23 +53,5 @@ protected virtual IEnumerable