diff Core/JobsEngine/GenericJobUnserializer.cpp @ 2648:e1893d31652a jobs

serialization of JobHandler
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 31 May 2018 18:44:05 +0200
parents 740983056f9e
children a3f0f61a14ca
line wrap: on
line diff
--- a/Core/JobsEngine/GenericJobUnserializer.cpp	Thu May 31 17:45:09 2018 +0200
+++ b/Core/JobsEngine/GenericJobUnserializer.cpp	Thu May 31 18:44:05 2018 +0200
@@ -43,10 +43,9 @@
 
 namespace Orthanc
 {
-  IJob* GenericJobUnserializer::UnserializeJob(const Json::Value& source)
+  IJob* GenericJobUnserializer::UnserializeJob(const std::string& type,
+                                               const Json::Value& source)
   {
-    const std::string type = GetString(source, "Type");
-    JobState state = StringToJobState(GetString(source, "State"));
 
     LOG(ERROR) << "Cannot unserialize job of type: " << type;
     throw OrthancException(ErrorCode_BadFileFormat);