| 68 | } |
| 69 | |
| 70 | void PyProcessSession::read(std::shared_ptr<script::ScriptFlowFile> script_flow_file, |
| 71 | py::object input_stream_callback) { |
| 72 | if (!session_) { |
| 73 | throw std::runtime_error("Access of ProcessSession after it has been released"); |
| 74 | } |
| 75 | |
| 76 | auto flow_file = script_flow_file->getFlowFile(); |
| 77 | |
| 78 | if (!flow_file) { |
| 79 | throw std::runtime_error("Access of FlowFile after it has been released"); |
| 80 | } |
| 81 | |
| 82 | PyInputStreamCallback py_callback(input_stream_callback); |
| 83 | session_->read(flow_file, &py_callback); |
| 84 | } |
| 85 | |
| 86 | void PyProcessSession::write(std::shared_ptr<script::ScriptFlowFile> script_flow_file, |
| 87 | py::object output_stream_callback) { |
nothing calls this directly
no test coverage detected