comparison OrthancServer/ServerContext.cpp @ 2925:a80ba85d89e6

Orthanc starts even if jobs from a previous execution cannot be unserialized
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 09 Nov 2018 09:46:21 +0100
parents e5e3253a1164
children 4767d36679ed
comparison
equal deleted inserted replaced
2924:22524fd06225 2925:a80ba85d89e6
168 { 168 {
169 jobsEngine_.LoadRegistryFromString(unserializer, serialized); 169 jobsEngine_.LoadRegistryFromString(unserializer, serialized);
170 } 170 }
171 catch (OrthancException& e) 171 catch (OrthancException& e)
172 { 172 {
173 LOG(ERROR) << "Cannot unserialize the jobs engine: " << e.What(); 173 LOG(WARNING) << "Cannot unserialize the jobs engine, starting anyway: " << e.What();
174 throw;
175 } 174 }
176 } 175 }
177 else 176 else
178 { 177 {
179 LOG(INFO) << "The last execution of Orthanc has archived no job"; 178 LOG(INFO) << "The last execution of Orthanc has archived no job";
180 } 179 }
181 } 180 }
182 else 181 else
183 { 182 {
184 LOG(WARNING) << "Not reloading the jobs from the last execution of Orthanc"; 183 LOG(INFO) << "Not reloading the jobs from the last execution of Orthanc";
185 } 184 }
186
187 //jobsEngine_.GetRegistry().SetMaxCompleted // TODO
188 185
189 jobsEngine_.GetRegistry().SetObserver(*this); 186 jobsEngine_.GetRegistry().SetObserver(*this);
190 jobsEngine_.Start(); 187 jobsEngine_.Start();
191 isJobsEngineUnserialized_ = true; 188 isJobsEngineUnserialized_ = true;
192 189