diff OrthancServer/ServerContext.cpp @ 4024:1d2b31fc782f more-changes

new 'changes': JobSubmitted, JobSuccess, JobFailure
author Alain Mazy <alain@mazy.be>
date Tue, 09 Jun 2020 12:20:42 +0200
parents a2e4edc7b9aa
children 100fbe970762
line wrap: on
line diff
--- a/OrthancServer/ServerContext.cpp	Tue Jun 09 11:54:58 2020 +0200
+++ b/OrthancServer/ServerContext.cpp	Tue Jun 09 12:20:42 2020 +0200
@@ -143,6 +143,7 @@
   {
     haveJobsChanged_ = true;
     mainLua_.SignalJobSubmitted(jobId);
+    plugins_->SignalJobSubmitted(jobId);
   }
   
 
@@ -150,6 +151,7 @@
   {
     haveJobsChanged_ = true;
     mainLua_.SignalJobSuccess(jobId);
+    plugins_->SignalJobSuccess(jobId);
   }
 
   
@@ -157,6 +159,7 @@
   {
     haveJobsChanged_ = true;
     mainLua_.SignalJobFailure(jobId);
+    plugins_->SignalJobFailure(jobId);
   }
 
 
@@ -190,7 +193,7 @@
       LOG(INFO) << "Not reloading the jobs from the last execution of Orthanc";
     }
 
-    jobsEngine_.GetRegistry().AddObserver(*this);
+    jobsEngine_.GetRegistry().SetObserver(*this);
     jobsEngine_.Start();
     isJobsEngineUnserialized_ = true;
 
@@ -347,7 +350,7 @@
         saveJobsThread_.join();
       }
 
-      jobsEngine_.GetRegistry().ResetObserver(*this);
+      jobsEngine_.GetRegistry().ResetObserver();
 
       if (isJobsEngineUnserialized_)
       {