Skip to content

Commit d135b12

Browse files
authored
Merge pull request #1292 from Ma27/fix-queue-runner-stats
hydra-queue-runner: fix stats
2 parents 526e8bd + 5c35d1b commit d135b12

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/hydra-queue-runner/hydra-queue-runner.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,18 +618,19 @@ void State::dumpStatus(Connection & conn)
618618
}
619619

620620
{
621-
auto jobsets_json = statusJson["jobsets"] = json::object();
621+
auto jobsets_json = json::object();
622622
auto jobsets_(jobsets.lock());
623623
for (auto & jobset : *jobsets_) {
624624
jobsets_json[jobset.first.first + ":" + jobset.first.second] = {
625625
{"shareUsed", jobset.second->shareUsed()},
626626
{"seconds", jobset.second->getSeconds()},
627627
};
628628
}
629+
statusJson["jobsets"] = jobsets_json;
629630
}
630631

631632
{
632-
auto machineTypesJson = statusJson["machineTypes"] = json::object();
633+
auto machineTypesJson = json::object();
633634
auto machineTypes_(machineTypes.lock());
634635
for (auto & i : *machineTypes_) {
635636
auto machineTypeJson = machineTypesJson[i.first] = {
@@ -642,6 +643,7 @@ void State::dumpStatus(Connection & conn)
642643
if (i.second.running == 0)
643644
machineTypeJson["lastActive"] = std::chrono::system_clock::to_time_t(i.second.lastActive);
644645
}
646+
statusJson["machineTypes"] = machineTypesJson;
645647
}
646648

647649
auto store = getDestStore();

0 commit comments

Comments
 (0)