From e7381370e68aa2a70855d043496cb2d4dcdb9b1e Mon Sep 17 00:00:00 2001 From: Rory McNicholl Date: Tue, 26 Mar 2024 12:31:29 +0000 Subject: [PATCH] only show zero file_size warning once per download --- app/jobs/bulkrax/download_cloud_file_job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/bulkrax/download_cloud_file_job.rb b/app/jobs/bulkrax/download_cloud_file_job.rb index 2b29bee2..5efb95ee 100644 --- a/app/jobs/bulkrax/download_cloud_file_job.rb +++ b/app/jobs/bulkrax/download_cloud_file_job.rb @@ -21,7 +21,7 @@ def perform(file, target_file) # Use number_to_human_size for formatting readable_retrieved = number_to_human_size(retrieved) readable_total = number_to_human_size(total) - Rails.logger.info "Downloaded #{readable_retrieved} of #{readable_total}, #{filename}: #{percentage.round}% complete" + Rails.logger.info "Downloaded #{readable_retrieved} of #{readable_total}, #{filename}: #{percentage.round}% complete" if (first=true)…false and first last_logged_time = current_time end end