mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-24 04:55:52 +00:00
Start to hook this stuff up.
This commit is contained in:
@@ -957,22 +957,7 @@ Json::Value NetworkOPs::getServerInfo()
|
||||
if (mConsensus)
|
||||
info["consensus"] = mConsensus->getJson();
|
||||
|
||||
typedef std::pair<JobType, int> jt_int_pair;
|
||||
bool anyJobs = false;
|
||||
Json::Value jobs = Json::arrayValue;
|
||||
std::vector< std::pair<JobType, int> > jobCounts = theApp->getJobQueue().getJobCounts();
|
||||
BOOST_FOREACH(jt_int_pair& it, jobCounts)
|
||||
{
|
||||
if (it.second != 0)
|
||||
{
|
||||
Json::Value o = Json::objectValue;
|
||||
o[Job::toString(it.first)] = it.second;
|
||||
jobs.append(o);
|
||||
anyJobs = true;
|
||||
}
|
||||
}
|
||||
if (anyJobs)
|
||||
info["jobs"] = jobs;
|
||||
info["jobs"] = theApp->getJobQueue().getJson();
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user