Checkpointing work
This commit is contained in:
@@ -197,7 +197,7 @@ namespace daggy::daggyd {
|
||||
queueDAG_(runID, dag, dagSpec.taskConfig);
|
||||
|
||||
response.send(Pistache::Http::Code::Ok,
|
||||
R"({"runID": )" + std::to_string(runID) + "}");
|
||||
R"({"runID": )" + std::to_string(runID) + "}\n");
|
||||
}
|
||||
|
||||
void Server::handleValidateDAG(const Pistache::Rest::Request &request,
|
||||
@@ -205,12 +205,13 @@ namespace daggy::daggyd {
|
||||
{
|
||||
try {
|
||||
dagFromJSON(request.body());
|
||||
response.send(Pistache::Http::Code::Ok, R"({"valid": true})");
|
||||
response.send(Pistache::Http::Code::Ok, R"({"valid": true}\n)");
|
||||
}
|
||||
catch (std::exception &e) {
|
||||
std::string error = e.what();
|
||||
response.send(Pistache::Http::Code::Ok,
|
||||
std::string{R"({"valid": true, "error": })"} + error + "}");
|
||||
response.send(
|
||||
Pistache::Http::Code::Ok,
|
||||
std::string{R"({"valid": true, "error": })"} + error + "}\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,7 +276,7 @@ namespace daggy::daggyd {
|
||||
ss << '}' // end of taskCounts
|
||||
<< '}'; // end of item
|
||||
}
|
||||
ss << ']';
|
||||
ss << "]\n";
|
||||
}
|
||||
else {
|
||||
// HTML
|
||||
@@ -311,7 +312,7 @@ namespace daggy::daggyd {
|
||||
}
|
||||
ss << "</table>";
|
||||
}
|
||||
ss << "</body></html>";
|
||||
ss << "</body></html>\n";
|
||||
}
|
||||
response.send(Pistache::Http::Code::Ok, ss.str());
|
||||
}
|
||||
@@ -388,7 +389,7 @@ namespace daggy::daggyd {
|
||||
ss << stateUpdateRecordToJSON(change);
|
||||
}
|
||||
ss << "]";
|
||||
ss << '}';
|
||||
ss << "}\n";
|
||||
}
|
||||
else {
|
||||
std::unordered_map<RunState, size_t> stateCounts;
|
||||
@@ -591,7 +592,7 @@ namespace daggy::daggyd {
|
||||
<< attempt.executorLog << "</pre></td></tr>";
|
||||
}
|
||||
|
||||
ss << "</table></body></html>";
|
||||
ss << "</table></body></html>\n";
|
||||
}
|
||||
response.send(Pistache::Http::Code::Ok, ss.str());
|
||||
}
|
||||
@@ -610,7 +611,7 @@ namespace daggy::daggyd {
|
||||
std::stringstream ss;
|
||||
ss << R"({ "runID": )" << runID << R"(, "taskName": )"
|
||||
<< std::quoted(taskName) << R"(, "state": )"
|
||||
<< std::quoted(state._to_string()) << '}';
|
||||
<< std::quoted(state._to_string()) << "}\n";
|
||||
response.send(Pistache::Http::Code::Ok, ss.str());
|
||||
}
|
||||
catch (std::exception &e) {
|
||||
@@ -642,7 +643,7 @@ namespace daggy::daggyd {
|
||||
void Server::handleReady(const Pistache::Rest::Request &request,
|
||||
Pistache::Http::ResponseWriter response)
|
||||
{
|
||||
response.send(Pistache::Http::Code::Ok, R"({ "msg": "Ya like DAGs?"})");
|
||||
response.send(Pistache::Http::Code::Ok, R"({ "msg": "Ya like DAGs?"}\n)");
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user