Skip to content

Commit

Permalink
Format work requests according to ndjson spec
Browse files Browse the repository at this point in the history
JSON persistent workers now delimit requests with newlines
  • Loading branch information
wolfd authored and danny-skydio committed Nov 2, 2021
1 parent dbec72e commit 91df9fb
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ final class JsonWorkerProtocol implements WorkerProtocolImpl {

@Override
public void putRequest(WorkRequest request) throws IOException {
// WorkRequests are serialized according to ndjson spec.
// https://github.com/ndjson/ndjson-spec
jsonPrinter.appendTo(request, jsonWriter);
jsonWriter.append(System.lineSeparator());
jsonWriter.flush();
}

Expand Down

0 comments on commit 91df9fb

Please sign in to comment.