comparison OrthancServer/Sources/ServerContext.cpp @ 4607:f75c63aa9de0 db-changes

differentiating between shared and private global properties
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 30 Mar 2021 18:10:27 +0200
parents a3c6678aa7b1
children 95ffe3b6ef7c
comparison
equal deleted inserted replaced
4606:d01702fb29a9 4607:f75c63aa9de0
213 bool loadJobsFromDatabase) 213 bool loadJobsFromDatabase)
214 { 214 {
215 if (loadJobsFromDatabase) 215 if (loadJobsFromDatabase)
216 { 216 {
217 std::string serialized; 217 std::string serialized;
218 if (index_.LookupGlobalProperty(serialized, GlobalProperty_JobsRegistry)) 218 if (index_.LookupGlobalProperty(serialized, GlobalProperty_JobsRegistry, false /* not shared */))
219 { 219 {
220 LOG(WARNING) << "Reloading the jobs from the last execution of Orthanc"; 220 LOG(WARNING) << "Reloading the jobs from the last execution of Orthanc";
221 221
222 try 222 try
223 { 223 {
259 jobsEngine_.GetRegistry().Serialize(value); 259 jobsEngine_.GetRegistry().Serialize(value);
260 260
261 std::string serialized; 261 std::string serialized;
262 Toolbox::WriteFastJson(serialized, value); 262 Toolbox::WriteFastJson(serialized, value);
263 263
264 index_.SetGlobalProperty(GlobalProperty_JobsRegistry, serialized); 264 index_.SetGlobalProperty(GlobalProperty_JobsRegistry, false /* not shared */, serialized);
265 } 265 }
266 catch (OrthancException& e) 266 catch (OrthancException& e)
267 { 267 {
268 LOG(ERROR) << "Cannot serialize the jobs engine: " << e.What(); 268 LOG(ERROR) << "Cannot serialize the jobs engine: " << e.What();
269 } 269 }