lordgamez commented on code in PR #1586:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1586#discussion_r1234094500


##########
extensions/aws/s3/S3Wrapper.cpp:
##########
@@ -297,4 +404,57 @@ FetchObjectResult S3Wrapper::fillFetchObjectResult(const 
GetObjectRequestParamet
   return result;
 }
 
+void S3Wrapper::addListMultipartUploadResults(const 
Aws::Vector<Aws::S3::Model::MultipartUpload>& uploads, 
std::optional<std::chrono::milliseconds> max_upload_age,
+    std::vector<MultipartUpload>& filtered_uploads) {
+  const auto now = Aws::Utils::DateTime::Now();
+  for (const auto& upload : uploads) {
+    if (max_upload_age && now - upload.GetInitiated() <= *max_upload_age) {
+      logger_->log_debug("Multipart upload with key '%s' and upload id '%s' 
did not meet the age limit", upload.GetKey(), upload.GetUploadId());
+      continue;
+    }

Review Comment:
   The lister functions list all of the pending uploads by default if the age 
limit is not set, which is an optional parameter. I wanted to reuse it for the 
age off lister as well, because that's the only difference. I agree we that the 
namings should be better in this case I can work on that a bit.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to