Mercurial > hg > orthanc
changeset 6210:6300c3adcb07 default tip
HK: new ForceReconstructFiles configuration
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Mon, 16 Jun 2025 21:31:01 +0200 (19 hours ago) |
parents | 8c2571de5f8e |
children | |
files | NEWS OrthancServer/Plugins/Samples/Housekeeper/Plugin.cpp |
diffstat | 2 files changed, 21 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Mon Jun 16 09:30:12 2025 +0200 +++ b/NEWS Mon Jun 16 21:31:01 2025 +0200 @@ -1,6 +1,16 @@ Pending changes in the mainline =============================== +Plugins +------- + +* Housekeeper plugin: + - new "ForceReconstructFiles": If "Force" is set to true, forces + the "ReconstructFiles" option when reconstructing resources even + if the plugin did not detect any changes in the configuration that + should trigger a Reconstruct. + + Version 1.12.8 (2025-06-13) ===========================
--- a/OrthancServer/Plugins/Samples/Housekeeper/Plugin.cpp Mon Jun 16 09:30:12 2025 +0200 +++ b/OrthancServer/Plugins/Samples/Housekeeper/Plugin.cpp Mon Jun 16 21:31:01 2025 +0200 @@ -41,6 +41,7 @@ static int globalPropertyId_ = 0; static bool force_ = false; +static bool forceReconstructFiles_ = false; static unsigned int throttleDelay_ = 0; static std::unique_ptr<boost::thread> workerThread_; static bool workerThreadShouldStop_ = false; @@ -568,10 +569,10 @@ { Json::Value result; - if (needsReconstruct || needsReingest ||force_) + if (needsReconstruct || needsReingest || force_) { Json::Value request; - if (needsReingest) + if (needsReingest || forceReconstructFiles_) { request["ReconstructFiles"] = true; } @@ -856,6 +857,13 @@ // any changes in configuration "Force": false, + // New in 1.12.9 + // If "Force" is set to true, forces the "ReconstructFiles" + // option when reconstructing resources even if the plugin + // did not detect any changes in the configuration that + // should trigger a Reconstruct. + "ForceReconstructFiles": false, + // Delay (in seconds) between reconstruction of 2 studies // This avoids overloading Orthanc with the housekeeping // process and leaves room for other operations. @@ -898,6 +906,7 @@ globalPropertyId_ = housekeeper.GetIntegerValue("GlobalPropertyId", 1025); force_ = housekeeper.GetBooleanValue("Force", false); + forceReconstructFiles_ = housekeeper.GetBooleanValue("ForceReconstructFiles", false); throttleDelay_ = housekeeper.GetUnsignedIntegerValue("ThrottleDelay", 5); if (housekeeper.GetJson().isMember("Triggers"))