Mercurial > hg > orthanc
diff OrthancServer/Sources/main.cpp @ 5061:e95fadefeb72
new MaximumStorageMode configuration
author | Alain Mazy <am@osimis.io> |
---|---|
date | Tue, 09 Aug 2022 17:57:38 +0200 |
parents | e1495a34cd39 |
children | bdec57f3cbf2 |
line wrap: on
line diff
--- a/OrthancServer/Sources/main.cpp Mon Aug 08 12:42:48 2022 +0200 +++ b/OrthancServer/Sources/main.cpp Tue Aug 09 17:57:38 2022 +0200 @@ -43,6 +43,7 @@ #include "OrthancMoveRequestHandler.h" #include "OrthancWebDav.h" #include "ServerContext.h" +#include "ServerEnumerations.h" #include "ServerJobs/StorageCommitmentScpJob.h" #include "ServerToolbox.h" #include "StorageCommitmentReports.h" @@ -1564,6 +1565,16 @@ try { + std::string mode = lock.GetConfiguration().GetStringParameter("MaximumStorageMode", "Recycle"); + context.GetIndex().SetMaximumStorageMode(StringToMaxStorageMode(mode)); + } + catch (...) + { + context.GetIndex().SetMaximumStorageMode(MaxStorageMode_Recycle); + } + + try + { uint64_t size = lock.GetConfiguration().GetUnsignedIntegerParameter("MaximumStorageCacheSize", 128); context.SetMaximumStorageCacheSize(size * 1024 * 1024); }