comparison OrthancServer/ServerContext.h @ 2815:925d8dc03a23

unserialization of jobs from plugins
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 11 Sep 2018 16:34:21 +0200
parents 3a55b77339ff
children ae8e72009e64
comparison
equal deleted inserted replaced
2814:7d1d3136f6cf 2815:925d8dc03a23
141 unsigned int sleepDelay); 141 unsigned int sleepDelay);
142 142
143 void ReadDicomAsJsonInternal(std::string& result, 143 void ReadDicomAsJsonInternal(std::string& result,
144 const std::string& instancePublicId); 144 const std::string& instancePublicId);
145 145
146 void SetupJobsEngine(bool unitTesting,
147 bool loadJobsFromDatabase);
148
149 void SaveJobsEngine(); 146 void SaveJobsEngine();
150 147
151 virtual void SignalJobSubmitted(const std::string& jobId); 148 virtual void SignalJobSubmitted(const std::string& jobId);
152 149
153 virtual void SignalJobSuccess(const std::string& jobId); 150 virtual void SignalJobSuccess(const std::string& jobId);
176 ServerListeners listeners_; 173 ServerListeners listeners_;
177 boost::recursive_mutex listenersMutex_; 174 boost::recursive_mutex listenersMutex_;
178 175
179 bool done_; 176 bool done_;
180 bool haveJobsChanged_; 177 bool haveJobsChanged_;
178 bool isJobsEngineUnserialized_;
181 SharedMessageQueue pendingChanges_; 179 SharedMessageQueue pendingChanges_;
182 boost::thread changeThread_; 180 boost::thread changeThread_;
183 boost::thread saveJobsThread_; 181 boost::thread saveJobsThread_;
184 182
185 SharedArchive queryRetrieveArchive_; 183 SharedArchive queryRetrieveArchive_;
206 } 204 }
207 }; 205 };
208 206
209 ServerContext(IDatabaseWrapper& database, 207 ServerContext(IDatabaseWrapper& database,
210 IStorageArea& area, 208 IStorageArea& area,
211 bool unitTesting, 209 bool unitTesting);
212 bool loadJobsFromDatabase);
213 210
214 ~ServerContext(); 211 ~ServerContext();
212
213 void SetupJobsEngine(bool unitTesting,
214 bool loadJobsFromDatabase);
215 215
216 ServerIndex& GetIndex() 216 ServerIndex& GetIndex()
217 { 217 {
218 return index_; 218 return index_;
219 } 219 }