Sha256: 476c9a2ee4a5d11b6dc1104860e001725e1dacd347d9ee412464ea8cc9c45176

Contents?: true

Size: 383 Bytes

Versions: 4

Compression:

Stored size: 383 Bytes

Contents

# frozen_string_literal: true

module LoggableActivity
  # This module is responsible for sanitizing activities.
  # When an encryption keys deleted_at field is set, the key is deleted.
  module Sanitizer
    def self.run
      ::LoggableActivity::EncryptionKey.where('delete_at < ?', DateTime.now).find_in_batches do |batch|
        batch.each(&:delete)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
loggable_activity-0.5.7 lib/loggable_activity/sanitizer.rb
loggable_activity-0.5.6 lib/loggable_activity/sanitizer.rb
loggable_activity-0.5.4 lib/loggable_activity/sanitizer.rb
loggable_activity-0.5.0 lib/loggable_activity/sanitizer.rb