# HG changeset patch # User Alain Mazy # Date 1653396471 -7200 # Node ID ed4ceb31bcf8bfdb08ac82776e69241e9b9dd115 # Parent 59491402f8f1f8ad3e1e6cd4d122ac90901981b0 Housekeeper plugin: Fix resume of previous processing diff -r 59491402f8f1 -r ed4ceb31bcf8 NEWS --- a/NEWS Tue May 24 14:47:35 2022 +0200 +++ b/NEWS Tue May 24 14:47:51 2022 +0200 @@ -2,6 +2,11 @@ =========================== +Maintenance +----------- + +* Housekeeper plugin: Fix resume of previous processing + Version 1.11.0 (2022-05-09) =========================== diff -r 59491402f8f1 -r ed4ceb31bcf8 OrthancServer/Plugins/Samples/Housekeeper/Plugin.cpp --- a/OrthancServer/Plugins/Samples/Housekeeper/Plugin.cpp Tue May 24 14:47:35 2022 +0200 +++ b/OrthancServer/Plugins/Samples/Housekeeper/Plugin.cpp Tue May 24 14:47:51 2022 +0200 @@ -537,21 +537,37 @@ bool needsReconstruct = false; bool needsReingest = false; + bool needsFullProcessing = false; + bool needsProcessing = false; { boost::recursive_mutex::scoped_lock lock(pluginStatusMutex_); + + // compare with last full processed configuration CheckNeedsProcessing(needsReconstruct, needsReingest, currentDbConfiguration, pluginStatus_.lastProcessedConfiguration); + needsFullProcessing = needsReconstruct || needsReingest; + needsProcessing = needsFullProcessing; + + // if a processing was in progress, check if the config has changed since + if (pluginStatus_.currentlyProcessingConfiguration.IsDefined()) + { + needsProcessing = true; // since a processing was in progress, we need at least a partial processing + + bool needsReconstruct2 = false; + bool needsReingest2 = false; + + CheckNeedsProcessing(needsReconstruct2, needsReingest2, currentDbConfiguration, pluginStatus_.currentlyProcessingConfiguration); + needsFullProcessing = needsReconstruct2 || needsReingest2; // if the configuration has changed compared to the config being processed, we need a full processing again + } } - bool needsProcessing = needsReconstruct || needsReingest; - if (!needsProcessing) { OrthancPlugins::LogWarning("Housekeeper: everything has been processed already !"); return; } - if (force_ || needsProcessing) + if (force_ || needsFullProcessing) { if (force_) {