Lots of fixes to poor daggyr implementation, added debugging messages
This commit is contained in:
@@ -159,6 +159,8 @@ namespace daggy::daggyr {
|
||||
.resourcesUsed = resourcesUsed});
|
||||
}
|
||||
|
||||
std::cout << "Enqueued " << runID << " / " << taskName << std::endl;
|
||||
|
||||
response.send(Pistache::Http::Code::Ok, "");
|
||||
}
|
||||
|
||||
@@ -175,6 +177,7 @@ namespace daggy::daggyr {
|
||||
|
||||
std::string payload;
|
||||
|
||||
// Check to see if it's pending
|
||||
bool found = false;
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(pendingGuard_);
|
||||
@@ -193,11 +196,13 @@ namespace daggy::daggyr {
|
||||
curCapacity_.cores += it->second.resourcesUsed.cores;
|
||||
curCapacity_.memoryMB += it->second.resourcesUsed.memoryMB;
|
||||
}
|
||||
std::cout << "Resolved " << it->first.first << " / "
|
||||
<< it->first.second << std::endl;
|
||||
}
|
||||
else {
|
||||
payload = R"({ "state": "RUNNING" })";
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
payload = R"({ "state": "RUNNING" })";
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,6 +216,7 @@ namespace daggy::daggyr {
|
||||
payload = R"({ "state": "COMPLETED", "attempt": )" +
|
||||
attemptRecordToJSON(it->second) + "}";
|
||||
}
|
||||
|
||||
response.send(Pistache::Http::Code::Ok, payload);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user