Mercurial > hg > orthanc
changeset 5376:4ab905749aed
fix Housekeeper plugin triggers configuration
author | Alain Mazy <am@osimis.io> |
---|---|
date | Tue, 22 Aug 2023 16:35:22 +0200 |
parents | 984300e70069 |
children | daf4807631c5 |
files | NEWS OrthancServer/Plugins/Samples/Housekeeper/Plugin.cpp |
diffstat | 2 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Tue Aug 22 12:35:32 2023 +0200 +++ b/NEWS Tue Aug 22 16:35:22 2023 +0200 @@ -7,6 +7,7 @@ * Housekeeper plugin: - Update to rebuild the cache of the DicomWeb plugin when updating to DicomWeb 1.15. - New trigger configuration: "DicomWebCacheChange" + - Fixed reading the triggers configuration. REST API --------
--- a/OrthancServer/Plugins/Samples/Housekeeper/Plugin.cpp Tue Aug 22 12:35:32 2023 +0200 +++ b/OrthancServer/Plugins/Samples/Housekeeper/Plugin.cpp Tue Aug 22 16:35:22 2023 +0200 @@ -834,7 +834,8 @@ "Triggers" : { "StorageCompressionChange": true, "MainDicomTagsChange": true, - "UnnecessaryDicomAsJsonFiles": true + "UnnecessaryDicomAsJsonFiles": true, + "DicomWebCacheChange": true // new in 1.12.2 } } @@ -848,12 +849,14 @@ if (housekeeper.GetJson().isMember("Triggers")) { - triggerOnStorageCompressionChange_ = housekeeper.GetBooleanValue("StorageCompressionChange", true); + OrthancPlugins::OrthancConfiguration triggers; + housekeeper.GetSection(triggers, "Triggers"); + triggerOnStorageCompressionChange_ = triggers.GetBooleanValue("StorageCompressionChange", true); - triggerOnMainDicomTagsChange_ = housekeeper.GetBooleanValue("MainDicomTagsChange", true); - triggerOnUnnecessaryDicomAsJsonFiles_ = housekeeper.GetBooleanValue("UnnecessaryDicomAsJsonFiles", true); - triggerOnIngestTranscodingChange_ = housekeeper.GetBooleanValue("IngestTranscodingChange", true); - triggerOnDicomWebCacheChange_ = housekeeper.GetBooleanValue("DicomWebCacheChange", true); + triggerOnMainDicomTagsChange_ = triggers.GetBooleanValue("MainDicomTagsChange", true); + triggerOnUnnecessaryDicomAsJsonFiles_ = triggers.GetBooleanValue("UnnecessaryDicomAsJsonFiles", true); + triggerOnIngestTranscodingChange_ = triggers.GetBooleanValue("IngestTranscodingChange", true); + triggerOnDicomWebCacheChange_ = triggers.GetBooleanValue("DicomWebCacheChange", true); } if (housekeeper.GetJson().isMember("Schedule"))