Cleanup worker json handling.
This commit is contained in:
parent
7aa9835adb
commit
f98da2e00b
|
@ -252,9 +252,7 @@ static void worker(
|
||||||
debug("worker process %d at '%s'", getpid(), attrPath);
|
debug("worker process %d at '%s'", getpid(), attrPath);
|
||||||
|
|
||||||
/* Evaluate it and send info back to the collector. */
|
/* Evaluate it and send info back to the collector. */
|
||||||
nlohmann::json reply;
|
nlohmann::json reply = nlohmann::json{ { "attr", attrPath } };
|
||||||
reply["attr"] = attrPath;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
auto vTmp = findAlongAttrPath(state, attrPath, autoArgs, *vRoot).first;
|
auto vTmp = findAlongAttrPath(state, attrPath, autoArgs, *vRoot).first;
|
||||||
|
|
||||||
|
@ -264,9 +262,7 @@ static void worker(
|
||||||
if (auto drvInfo = getDerivation(state, *v, false)) {
|
if (auto drvInfo = getDerivation(state, *v, false)) {
|
||||||
|
|
||||||
auto drv = Drv(state, *drvInfo);
|
auto drv = Drv(state, *drvInfo);
|
||||||
|
reply.update(drv);
|
||||||
reply = drv;
|
|
||||||
reply["attr"] = attrPath;
|
|
||||||
|
|
||||||
/* Register the derivation as a GC root. !!! This
|
/* Register the derivation as a GC root. !!! This
|
||||||
registers roots for jobs that we may have already
|
registers roots for jobs that we may have already
|
||||||
|
|
Loading…
Reference in a new issue