lib/rocket_job/jobs/dirmon_job.rb in rocketjob-5.0.0.beta4 vs lib/rocket_job/jobs/dirmon_job.rb in rocketjob-5.0.0.rc1

- old
+ new

@@ -70,18 +70,19 @@ def check_directories new_file_names = {} DirmonEntry.enabled.each do |entry| entry.each do |iopath| # S3 files are only visible once completely uploaded. - if iopath.is_a?(IOStreams::Paths::S3) - logger.info("S3 File: #{iopath}. Starting: #{entry.job_class_name}") + unless iopath.partial_files_visible? + logger.info("File: #{iopath}. Starting: #{entry.job_class_name}") entry.later(iopath) next end # BSON Keys cannot contain periods key = iopath.to_s.tr('.', '_') previous_size = previous_file_names[key] + # Check every few minutes for a file size change before trying to process the file. size = check_file(entry, iopath, previous_size) new_file_names[key] = size if size end end self.previous_file_names = new_file_names