diff OrthancServer/ServerJobs/LuaJobManager.cpp @ 2616:2f3007bf0708 jobs

event queues in Lua, serialization of sequence of operations
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 22 May 2018 12:25:37 +0200
parents f7a84b551ee4
children 1232922c8793
line wrap: on
line diff
--- a/OrthancServer/ServerJobs/LuaJobManager.cpp	Mon May 21 09:00:20 2018 +0200
+++ b/OrthancServer/ServerJobs/LuaJobManager.cpp	Tue May 22 12:25:37 2018 +0200
@@ -119,9 +119,13 @@
     {
       // Need to create a new job, as the previous one is either
       // finished, or is getting too long
-      that_.currentJob_ = new SequenceOfOperationsJob("Lua");
-      jobLock_.reset(new SequenceOfOperationsJob::Lock(*that_.currentJob_));
-      jobLock_->SetTrailingOperationTimeout(that_.trailingTimeout_);
+      that_.currentJob_ = new SequenceOfOperationsJob;
+      that_.currentJob_->SetDescription("Lua");
+
+      {
+        jobLock_.reset(new SequenceOfOperationsJob::Lock(*that_.currentJob_));
+        jobLock_->SetTrailingOperationTimeout(that_.trailingTimeout_);
+      }
     }
 
     assert(jobLock_.get() != NULL);