Skip to content

Commit

Permalink
Fix logstash-plugins#248 from original fork
Browse files Browse the repository at this point in the history
  • Loading branch information
fabionitto authored Apr 11, 2024
1 parent b7f42d7 commit e0fff8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/logstash/inputs/s3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def list_new_files
@logger.debug('Ignoring', :key => log.key)
elsif log.content_length <= 0
@logger.debug('Object Zero Length', :key => log.key)
elsif log.last_modified <= sincedb_time
elsif log.last_modified.to_i <= sincedb_time.to_i
@logger.debug('Object Not Modified', :key => log.key)
elsif log.last_modified > (current_time - CUTOFF_SECOND).utc # file modified within last two seconds will be processed in next cycle
@logger.debug('Object Modified After Cutoff Time', :key => log.key)
Expand Down Expand Up @@ -380,7 +380,7 @@ def process_log(queue, log)
filename = File.join(temporary_directory, File.basename(log.key))
if download_remote_file(object, filename)
if process_local_log(queue, filename, object)
if object.last_modified == log.last_modified
if object.last_modified.to_i == log.last_modified.to_i
backup_to_bucket(object)
backup_to_dir(filename)
delete_file_from_bucket(object)
Expand Down

0 comments on commit e0fff8c

Please sign in to comment.