comparison OrthancServer/ServerJobs/SystemCallOperation.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 25225f0b4f33
children
comparison
equal deleted inserted replaced
2614:3200223f9ade 2616:2f3007bf0708
109 catch (OrthancException& e) 109 catch (OrthancException& e)
110 { 110 {
111 LOG(ERROR) << "Lua: Failed system call - \"" << info << "\": " << e.What(); 111 LOG(ERROR) << "Lua: Failed system call - \"" << info << "\": " << e.What();
112 } 112 }
113 } 113 }
114
115
116 void SystemCallOperation::Serialize(Json::Value& result) const
117 {
118 result["Type"] = "SystemCall";
119 result["Command"] = command_;
120
121 Json::Value tmp;
122
123 tmp = Json::arrayValue;
124 for (size_t i = 0; i < preArguments_.size(); i++)
125 {
126 tmp.append(preArguments_[i]);
127 }
128
129 result["PreArguments"] = tmp;
130
131 tmp = Json::arrayValue;
132 for (size_t i = 0; i < postArguments_.size(); i++)
133 {
134 tmp.append(postArguments_[i]);
135 }
136
137 result["PostArguments"] = tmp;
138 }
114 } 139 }
115 140