mirror of https://gitee.com/bigwinds/arangodb
server health for aardvark
This commit is contained in:
parent
b93981df61
commit
2ab638160e
|
@ -39,17 +39,17 @@ namespace consensus {
|
|||
|
||||
enum JOB_STATUS {TODO, PENDING, FINISHED, FAILED, NOTFOUND};
|
||||
|
||||
static std::string const pendingPrefix = "/Target/Pending/";
|
||||
static std::string const pendingPrefix = "/Target/Pending/";
|
||||
static std::string const failedPrefix = "/Target/Failed/";
|
||||
static std::string const finishedPrefix = "/Target/Finished/";
|
||||
static std::string const failedPrefix = "/Target/Failed/";
|
||||
static std::string const cleanedPrefix = "Target/CleanedServers";
|
||||
static std::string const planColPrefix = "/Plan/Collections/";
|
||||
static std::string const curColPrefix = "/Current/Collections/";
|
||||
static std::string const toDoPrefix = "/Target/ToDo/";
|
||||
static std::string const toDoPrefix = "/Target/ToDo/";
|
||||
static std::string const cleanedPrefix = "Target/CleanedServers";
|
||||
static std::string const planColPrefix = "/Plan/Collections/";
|
||||
static std::string const curColPrefix = "/Current/Collections/";
|
||||
static std::string const blockedServersPrefix = "/Supervision/DBServers/";
|
||||
static std::string const blockedShardsPrefix = "/Supervision/Shards/";
|
||||
static std::string const serverStatePrefix = "/Sync/ServerStates/";
|
||||
static std::string const planVersion = "/Plan/Version";
|
||||
static std::string const planVersion = "/Plan/Version";
|
||||
|
||||
struct JobResult {
|
||||
JobResult() {}
|
||||
|
|
|
@ -265,11 +265,13 @@ void Supervision::run() {
|
|||
|
||||
void Supervision::workJobs() {
|
||||
|
||||
_snapshot = _agent->readDB().get("/");
|
||||
Node::Children const& todos = _snapshot(toDoPrefix).children();
|
||||
Node::Children const& pends = _snapshot(pendingPrefix).children();
|
||||
if (!todos.empty()) {
|
||||
for (auto const& todoEnt : todos) {
|
||||
Node const& job = *todoEnt.second;
|
||||
LOG(WARN) << __FILE__<<__LINE__ << job.toJson();
|
||||
|
||||
std::string jobType = job("type").getString(),
|
||||
jobId = job("jobId").getString(),
|
||||
creator = job("creator").getString();
|
||||
|
@ -280,11 +282,11 @@ void Supervision::workJobs() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Node::Children const& pends = _snapshot(pendingPrefix).children();
|
||||
if (!pends.empty()) {
|
||||
for (auto const& pendEnt : pends) {
|
||||
Node const& job = *pendEnt.second;
|
||||
LOG(WARN) << __FILE__<<__LINE__ << job.toJson();
|
||||
|
||||
std::string jobType = job("type").getString(),
|
||||
jobId = job("jobId").getString(),
|
||||
creator = job("creator").getString();
|
||||
|
|
Loading…
Reference in New Issue