diff Core/JobsEngine/JobsEngine.cpp @ 2812:ea7aea6f6a95

improved naming of methods in IJob
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 06 Sep 2018 16:23:40 +0200
parents 7cfc8d266f41
children dc18d5804746
line wrap: on
line diff
--- a/Core/JobsEngine/JobsEngine.cpp	Thu Sep 06 12:32:02 2018 +0200
+++ b/Core/JobsEngine/JobsEngine.cpp	Thu Sep 06 16:23:40 2018 +0200
@@ -55,14 +55,14 @@
 
     if (running.IsPauseScheduled())
     {
-      running.GetJob().ReleaseResources(JobReleaseReason_Paused);
+      running.GetJob().Stop(JobStopReason_Paused);
       running.MarkPause();
       return false;
     }
 
     if (running.IsCancelScheduled())
     {
-      running.GetJob().ReleaseResources(JobReleaseReason_Canceled);
+      running.GetJob().Stop(JobStopReason_Canceled);
       running.MarkCanceled();
       return false;
     }
@@ -71,7 +71,7 @@
 
     try
     {
-      result = running.GetJob().ExecuteStep();
+      result = running.GetJob().Step();
     }
     catch (OrthancException& e)
     {
@@ -89,19 +89,19 @@
     switch (result.GetCode())
     {
       case JobStepCode_Success:
-        running.GetJob().ReleaseResources(JobReleaseReason_Success);
+        running.GetJob().Stop(JobStopReason_Success);
         running.UpdateStatus(ErrorCode_Success);
         running.MarkSuccess();
         return false;
 
       case JobStepCode_Failure:
-        running.GetJob().ReleaseResources(JobReleaseReason_Failure);
+        running.GetJob().Stop(JobStopReason_Failure);
         running.UpdateStatus(result.GetFailureCode());
         running.MarkFailure();
         return false;
 
       case JobStepCode_Retry:
-        running.GetJob().ReleaseResources(JobReleaseReason_Retry);
+        running.GetJob().Stop(JobStopReason_Retry);
         running.UpdateStatus(ErrorCode_Success);
         running.MarkRetry(result.GetRetryTimeout());
         return false;