Skip to content

Commit 91df9fb

Browse files
wolfddanny-skydio
authored andcommitted
Format work requests according to ndjson spec
JSON persistent workers now delimit requests with newlines
1 parent dbec72e commit 91df9fb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/com/google/devtools/build/lib/worker/JsonWorkerProtocol.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ final class JsonWorkerProtocol implements WorkerProtocolImpl {
4848

4949
@Override
5050
public void putRequest(WorkRequest request) throws IOException {
51+
// WorkRequests are serialized according to ndjson spec.
52+
// https://github.com/ndjson/ndjson-spec
5153
jsonPrinter.appendTo(request, jsonWriter);
54+
jsonWriter.append(System.lineSeparator());
5255
jsonWriter.flush();
5356
}
5457

0 commit comments

Comments
 (0)