app/models/logical/naf/log_parser/job.rb in naf-2.1.10 vs app/models/logical/naf/log_parser/job.rb in naf-2.1.11
- old
+ new
@@ -44,9 +44,11 @@
get_s3_files do
@s3_log_reader = ::Logical::Naf::LogReader.new
return retrieve_log_files_from_s3
end
else
+ return [] unless record_id.present?
+
files = Dir["#{::Naf::PREFIX_PATH}/#{::Naf.schema_name}/jobs/#{record_id}/*"]
if files.present?
# Sort log files based on time
return files.sort { |x, y| Time.parse(y.scan(DATE_REGEX)[0][0]) <=> Time.parse(x.scan(DATE_REGEX)[0][0]) }
else