| 568 | } |
| 569 | |
| 570 | bool ProcessSession::exportContent(const std::string &destination, const std::string &tmpFile, const std::shared_ptr<core::FlowFile> &flow, bool /*keepContent*/) { |
| 571 | logger_->log_debug("Exporting content of %s to %s", flow->getUUIDStr(), destination); |
| 572 | |
| 573 | ProcessSessionReadCallback cb(tmpFile, destination, logger_); |
| 574 | read(flow, &cb); |
| 575 | |
| 576 | logger_->log_info("Committing %s", destination); |
| 577 | bool commit_ok = cb.commit(); |
| 578 | |
| 579 | if (commit_ok) { |
| 580 | logger_->log_info("Commit OK."); |
| 581 | } else { |
| 582 | logger_->log_error("Commit of %s to %s failed!", flow->getUUIDStr(), destination); |
| 583 | } |
| 584 | return commit_ok; |
| 585 | } |
| 586 | |
| 587 | bool ProcessSession::exportContent(const std::string &destination, const std::shared_ptr<core::FlowFile> &flow, bool keepContent) { |
| 588 | utils::Identifier tmpFileUuid = id_generator_->generate(); |