lib/sidekiq_workers.rb
# Looks for old legacy docs and deletes them
Looks for old legacy docs and deletes them
Looks for old legacy docs and deletes them
def perform
        purge_seconds = (C_.legacy_purge_days || 1).to_f * 86400.0
        dir = LegacyConverter.new.legacy_dir
        dir.each_entry do |file|
          next if (dir+file).directory?
          if Time.now - (dir+file).ctime > purge_seconds
            (dir+file).unlink
            logger.debug "Deleted old legacy file: #{file}"
          end
        end
      end
def perform purge_seconds = ( C_ . legacy_purge_days || 1 ) . to_f * 86400.0 dir = LegacyConverter . new . legacy_dir dir . each_entry do | file | next if ( dir + file ) . directory? if Time . now - ( dir + file ) . ctime > purge_seconds ( dir + file ) . unlink logger . debug "Deleted old legacy file: #{file}" end end end
Looks for old legacy docs and deletes them
Looks for old legacy docs and deletes them