comparison OrthancServer/ServerContext.cpp @ 2570:2e879c796ec7 jobs

JobsRegistry::SubmitAndWait(), StoreScuJob
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 07 May 2018 21:42:04 +0200
parents 99116ed6f38c
children 3ff4c50647ea
comparison
equal deleted inserted replaced
2569:2af17cd5eb1f 2570:2e879c796ec7
132 uint64_t s = Configuration::GetGlobalUnsignedIntegerParameter("DicomAssociationCloseDelay", 5); // In seconds 132 uint64_t s = Configuration::GetGlobalUnsignedIntegerParameter("DicomAssociationCloseDelay", 5); // In seconds
133 scu_.SetMillisecondsBeforeClose(s * 1000); // Milliseconds are expected here 133 scu_.SetMillisecondsBeforeClose(s * 1000); // Milliseconds are expected here
134 134
135 listeners_.push_back(ServerListener(lua_, "Lua")); 135 listeners_.push_back(ServerListener(lua_, "Lua"));
136 136
137 jobsEngine_.SetWorkersCount(Configuration::GetGlobalUnsignedIntegerParameter("ConcurrentJobs", 2));
138 //jobsEngine_.SetMaxCompleted // TODO
139 jobsEngine_.Start();
140
137 changeThread_ = boost::thread(ChangeThread, this); 141 changeThread_ = boost::thread(ChangeThread, this);
138 } 142 }
139 143
140 144
141 145
166 } 170 }
167 171
168 scu_.Finalize(); 172 scu_.Finalize();
169 173
170 // Do not change the order below! 174 // Do not change the order below!
175 jobsEngine_.Stop();
171 scheduler_.Stop(); 176 scheduler_.Stop();
172 index_.Stop(); 177 index_.Stop();
173 } 178 }
174 } 179 }
175 180