diff 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
line wrap: on
line diff
--- a/OrthancServer/ServerContext.cpp	Mon May 07 15:37:20 2018 +0200
+++ b/OrthancServer/ServerContext.cpp	Mon May 07 21:42:04 2018 +0200
@@ -134,6 +134,10 @@
 
     listeners_.push_back(ServerListener(lua_, "Lua"));
 
+    jobsEngine_.SetWorkersCount(Configuration::GetGlobalUnsignedIntegerParameter("ConcurrentJobs", 2));
+    //jobsEngine_.SetMaxCompleted   // TODO
+    jobsEngine_.Start();
+
     changeThread_ = boost::thread(ChangeThread, this);
   }
 
@@ -168,6 +172,7 @@
       scu_.Finalize();
 
       // Do not change the order below!
+      jobsEngine_.Stop();
       scheduler_.Stop();
       index_.Stop();
     }