Skip to content

Commit

Permalink
Fully propagate context to ExtractionRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisspyB committed Sep 18, 2024
1 parent 4df90eb commit d4ba56e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/gribjump/remote/GribJumpUser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void GribJumpUser::extract(eckit::Stream& s, eckit::Timer& timer) {

LogContext ctx(s);

ExtractRequest request(s);
ExtractRequest request(s, ctx);

timer.reset("EXTRACT requests received");

Expand Down
4 changes: 2 additions & 2 deletions src/gribjump/remote/RemoteGribJump.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ std::vector<std::vector<ExtractionResult*>> RemoteGribJump::extract(std::vector<
eckit::net::InstantTCPStream stream(client.connect(host_, port_));
timer.report("Connection established");


stream << "EXTRACT";

stream << ctx;

size_t nRequests = requests.size();
Expand Down Expand Up @@ -187,4 +187,4 @@ bool RemoteGribJump::receiveErrors(eckit::Stream& stream, bool raise) {

static GribJumpBuilder<RemoteGribJump> builder("remote");

} // namespace gribjump
} // namespace gribjump
3 changes: 2 additions & 1 deletion src/gribjump/remote/Request.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ void ScanRequest::replyToClient() {

//----------------------------------------------------------------------------------------------------------------------

ExtractRequest::ExtractRequest(eckit::Stream& stream) : Request(stream) {

ExtractRequest::ExtractRequest(eckit::Stream& stream, LogContext ctx) : Request(stream, ctx) {

// Receive the requests
// Temp, repackage the requests from old format into format the engine expects
Expand Down
2 changes: 1 addition & 1 deletion src/gribjump/remote/Request.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class ScanRequest : public Request {
class ExtractRequest : public Request {
public:

ExtractRequest(eckit::Stream& stream);
ExtractRequest(eckit::Stream& stream, LogContext ctx);

~ExtractRequest();

Expand Down

0 comments on commit d4ba56e

Please sign in to comment.