Skip to content

Commit aadae37

Browse files
committed
Ensure output is flushed in ClientInvoker::stats
Re ECFLOW-1944
1 parent ee4d079 commit aadae37

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libs/base/src/ecflow/base/stc/SStringCmd.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ bool SStringCmd::handle_server_response(ServerReply& server_reply, Cmd_ptr cts_c
3434
if (debug)
3535
cout << " SStringCmd::handle_server_response str.size()= " << str_.size() << "\n";
3636
if (server_reply.cli())
37-
std::cout << str_ << "\n";
37+
// The following uses std::endl to ensure the output is flushed.
38+
// This is necessary when called from the Python API, otherwise the output cannot be captured systematically.
39+
std::cout << str_ << std::endl;
3840
else
3941
server_reply.set_string(str_);
4042
return true;

0 commit comments

Comments
 (0)