Mercurial > hg > orthanc
comparison OrthancServer/ServerIndex.cpp @ 2940:4767d36679ed
refactoring access to Orthanc configuration
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 29 Nov 2018 11:47:00 +0100 |
parents | e5e3253a1164 |
children | 96089d1aba4d |
comparison
equal
deleted
inserted
replaced
2939:577786f59252 | 2940:4767d36679ed |
---|---|
38 #define NOMINMAX | 38 #define NOMINMAX |
39 #endif | 39 #endif |
40 | 40 |
41 #include "ServerIndexChange.h" | 41 #include "ServerIndexChange.h" |
42 #include "EmbeddedResources.h" | 42 #include "EmbeddedResources.h" |
43 #include "OrthancInitialization.h" | 43 #include "OrthancConfiguration.h" |
44 #include "../Core/DicomParsing/ParsedDicomFile.h" | 44 #include "../Core/DicomParsing/ParsedDicomFile.h" |
45 #include "ServerToolbox.h" | 45 #include "ServerToolbox.h" |
46 #include "../Core/Toolbox.h" | 46 #include "../Core/Toolbox.h" |
47 #include "../Core/Logging.h" | 47 #include "../Core/Logging.h" |
48 #include "../Core/DicomFormat/DicomArray.h" | 48 #include "../Core/DicomFormat/DicomArray.h" |
1929 | 1929 |
1930 | 1930 |
1931 void ServerIndex::UnstableResourcesMonitorThread(ServerIndex* that, | 1931 void ServerIndex::UnstableResourcesMonitorThread(ServerIndex* that, |
1932 unsigned int threadSleep) | 1932 unsigned int threadSleep) |
1933 { | 1933 { |
1934 int stableAge = Configuration::GetGlobalUnsignedIntegerParameter("StableAge", 60); | 1934 int stableAge; |
1935 | |
1936 { | |
1937 OrthancConfiguration::ReaderLock lock; | |
1938 stableAge = lock.GetConfiguration().GetUnsignedIntegerParameter("StableAge", 60); | |
1939 } | |
1940 | |
1935 if (stableAge <= 0) | 1941 if (stableAge <= 0) |
1936 { | 1942 { |
1937 stableAge = 60; | 1943 stableAge = 60; |
1938 } | 1944 } |
1939 | 1945 |